1516171819202122232425
@Test public void test() { Section s0 = new Section("some content"); Article a0 = new Article("art1", "auth1"); a0.addSection(s0); Ebean.save(a0); Article ar1 = Ebean.find(Article.class).setReadOnly(true).setId(a0.getId()).findUnique();
910111213141516171819
public class TestDeleteCascadingOneToMany extends TestCase { public void testDeleteCascadingOneToMany() { Section s0 = new Section("some content"); Article a0 = new Article("art1","auth1"); a0.addSection(s0); Ebean.save(a0); Ebean.delete(a0); }