use of org.hibernate.envers.test.integration.inheritance.joined.ChildEntity in project hibernate-orm by hibernate.
the class HasChangedChildAuditing method initData.
@Test
@Priority(10)
public void initData() {
EntityManager em = getEntityManager();
id1 = 1;
// Rev 1
em.getTransaction().begin();
ChildEntity ce = new ChildEntity(id1, "x", 1l);
em.persist(ce);
em.getTransaction().commit();
// Rev 2
em.getTransaction().begin();
ce = em.find(ChildEntity.class, id1);
ce.setData("y");
ce.setNumVal(2l);
em.getTransaction().commit();
}
Aggregations