Examples of ManyToOneComponent


Examples of org.hibernate.envers.test.entities.components.relations.ManyToOneComponent

        // Revision 2
        em = getEntityManager();
        em.getTransaction().begin();

    ManyToOneComponentTestEntity mtocte1 = new ManyToOneComponentTestEntity(new ManyToOneComponent(ste1, "data1"));

    em.persist(mtocte1);

        em.getTransaction().commit();
View Full Code Here

Examples of org.hibernate.envers.test.entities.components.relations.ManyToOneComponent

    @Test
    public void testHistoryOfId1() {
    StrTestEntity ste1 = getEntityManager().find(StrTestEntity.class, ste_id1);
    StrTestEntity ste2 = getEntityManager().find(StrTestEntity.class, ste_id2);

        ManyToOneComponentTestEntity ver2 = new ManyToOneComponentTestEntity(mtocte_id1, new ManyToOneComponent(ste1, "data1"));
    ManyToOneComponentTestEntity ver3 = new ManyToOneComponentTestEntity(mtocte_id1, new ManyToOneComponent(ste2, "data1"));

        assert getAuditReader().find(ManyToOneComponentTestEntity.class, mtocte_id1, 1) == null;
        assert getAuditReader().find(ManyToOneComponentTestEntity.class, mtocte_id1, 2).equals(ver2);
        assert getAuditReader().find(ManyToOneComponentTestEntity.class, mtocte_id1, 3).equals(ver3);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.