use of org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefIngPK in project hibernate-orm by hibernate.
the class BidirectionalEagerHbmTest method initData.
@Test
@Priority(10)
public void initData() {
EntityManager em = getEntityManager();
// Revision 1
em.getTransaction().begin();
BidirectionalEagerHbmRefEdPK ed1 = new BidirectionalEagerHbmRefEdPK("data_ed_1");
BidirectionalEagerHbmRefIngPK ing1 = new BidirectionalEagerHbmRefIngPK("data_ing_1");
ing1.setReference(ed1);
em.persist(ed1);
em.persist(ing1);
em.getTransaction().commit();
refIngId1 = ing1.getId();
em.close();
}
use of org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefIngPK in project hibernate-orm by hibernate.
the class BidirectionalEagerHbmTest method testNonProxyObjectTraversing.
@Test
public void testNonProxyObjectTraversing() {
BidirectionalEagerHbmRefIngPK referencing = getAuditReader().find(BidirectionalEagerHbmRefIngPK.class, refIngId1, 1);
assertNotNull(referencing.getReference().getData());
}
Aggregations