@Test public void testFooWithExistingBar() throws Exception { repository.insert(new Bar()); Bar bar = repository.query(new Bar()).single(); Foo foo = new Foo(); foo.barP.set(bar); foo.barsP.set(Arrays.asList(bar)); repository.insert(foo); assertEquals(1, repository.query(new Foo()).count()); assertEquals(1, repository.query(new Bar()).count()); }
public Insert(Repository repository) { super(repository); }
Insert extends Operation { public Insert(Repository repository) { super(repository); } }
Insert extends Operation { public Insert(Repository repository) { super(repository); } Insert(Repository repository); }
Insert extends Operation { public Insert(Repository repository) { super(repository); } Insert(Repository repository); void now(Propoid propoid); }
Insert extends Operation { public Insert(Repository repository) { super(repository); } Insert(Repository repository); void now(Propoid propoid);  }