use of org.hibernate.envers.test.integration.auditReader.NotAuditedTestEntity in project hibernate-orm by hibernate.
the class HasChangedAPITest method initData.
@Test
@Priority(10)
public void initData() {
EntityManager em = getEntityManager();
em.getTransaction().begin();
AuditedTestEntity ent1 = new AuditedTestEntity(1, "str1");
NotAuditedTestEntity ent2 = new NotAuditedTestEntity(1, "str1");
em.persist(ent1);
em.persist(ent2);
em.getTransaction().commit();
em.getTransaction().begin();
ent1 = em.find(AuditedTestEntity.class, 1);
ent2 = em.find(NotAuditedTestEntity.class, 1);
ent1.setStr1("str2");
ent2.setStr1("str2");
em.getTransaction().commit();
}
Aggregations