}
public void testRelatedSimpleOwnedUpdate() {
RelatedSimpleOwnedChild adam1 = new RelatedSimpleOwnedChild("adam1");
RelatedSimpleOwnedChild adam2 = new RelatedSimpleOwnedChild("adam2");
RelatedSimpleOwnedParent god = new RelatedSimpleOwnedParent("god");
god.child.set(adam1);
god.insert();
assertNotNull(god.id);
assertEquals(god.id, adam1.owner.id);
RelatedSimpleOwnedParent godbis = Model.getByKey(RelatedSimpleOwnedParent.class, god.id);
adam2.insert();
god.child.set(adam2);
god.update();
RelatedSimpleOwnedParent godbis2 = Model.getByKey(RelatedSimpleOwnedParent.class, godbis.id);
assertEquals(god, godbis2);
assertEquals(adam2, godbis2.child.get());
adam1.get();
assertNull(adam1.owner);