Search in sources :

Example 1 with BidirectionalEagerHbmRefEdPK

use of org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefEdPK 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();
}
Also used : EntityManager(javax.persistence.EntityManager) BidirectionalEagerHbmRefEdPK(org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefEdPK) BidirectionalEagerHbmRefIngPK(org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefIngPK) Test(org.junit.Test) Priority(org.hibernate.envers.test.Priority)

Aggregations

EntityManager (javax.persistence.EntityManager)1 Priority (org.hibernate.envers.test.Priority)1 BidirectionalEagerHbmRefEdPK (org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefEdPK)1 BidirectionalEagerHbmRefIngPK (org.hibernate.envers.test.entities.onetoone.BidirectionalEagerHbmRefIngPK)1 Test (org.junit.Test)1