Examples of FieldPersistenceEntity


Examples of org.apache.cayenne.jpa.itest.ch2.entity.FieldPersistenceEntity

    public void testFieldBasedPersistence() throws Exception {

        getDbHelper().deleteAll("FieldPersistenceEntity");

        FieldPersistenceEntity o1 = new FieldPersistenceEntity();
        getEntityManager().persist(o1);
        getEntityManager().getTransaction().commit();

        assertEquals(FieldPersistenceEntity.INITIAL_VALUE, getDbHelper().getObject(
                "FieldPersistenceEntity",
View Full Code Here

Examples of org.apache.cayenne.jpa.itest.ch2.entity.FieldPersistenceEntity

    }

    public void testSimplePk() throws Exception {
        getDbHelper().deleteAll("FieldPersistenceEntity");

        FieldPersistenceEntity o1 = new FieldPersistenceEntity();
        getEntityManager().persist(o1);

        assertEquals(0, o1.idField());
        getEntityManager().getTransaction().commit();
        assertTrue(o1.idField() > 0);
        assertEquals(o1.idField(), getDbHelper().getInt("FieldPersistenceEntity", "id"));
    }
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.