Package org.apache.openjpa.persistence.enhance.common.apps

Examples of org.apache.openjpa.persistence.enhance.common.apps.ManagedInverseTestInstance2


        map.put("openjpa.InverseManager", "true");
        OpenJPAEntityManager pm = (OpenJPAEntityManager)
            getEmf(map).createEntityManager();
        ManagedInverseTestInstance managed = (ManagedInverseTestInstance)
            newInstance(pm, ManagedInverseTestInstance.class);
        ManagedInverseTestInstance2 managed2 = (ManagedInverseTestInstance2)
            newInstance(pm, ManagedInverseTestInstance2.class);
        managed.setStringField("managed");
        managed2.setStringField("managed2");
        managed.setManaged2(managed2);

        startTx(pm);
        pm.persist(managed);
        endTx(pm);

        assertSame(managed, managed2.getManaged());
    }
View Full Code Here


        map.put("openjpa.InverseManager", "true");
        OpenJPAEntityManager pm = (OpenJPAEntityManager)
            getEmf(map).createEntityManager();
        ManagedInverseTestInstance managed = (ManagedInverseTestInstance)
            newInstance(pm, ManagedInverseTestInstance.class);
        ManagedInverseTestInstance2 managed2 = (ManagedInverseTestInstance2)
            newInstance(pm, ManagedInverseTestInstance2.class);
        managed.setStringField("managed");
        managed2.setStringField("managed2");
        managed.setManaged2(managed2);

        startTx(pm);
        pm.persist(managed);
        endTx(pm);

        assertSame(managed, managed2.getManaged());
    }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.enhance.common.apps.ManagedInverseTestInstance2

Copyright © 2018 www.massapicom. 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.