parent = em.find(BidiParent.class, id);
assertNotNull(parent);
}
public void testMergeWithManagedRelation() {
BidiParent parent = new BidiParent();
BidiChild child = em.find(BidiChild.class, childId);
parent.setOneToOneChild(child);
em.getTransaction().begin();
parent = em.merge(parent);
em.getTransaction().commit();
long id = parent.getId();
em.close();
em = emf.createEntityManager();
parent = em.find(BidiParent.class, id);
assertNotNull(parent);