Search in sources :

Example 1 with GeneratedColumnTest2

use of org.apache.cayenne.testdo.generated.GeneratedColumnTest2 in project cayenne by apache.

the class IdentityColumnsIT method testMultipleNewObjectsSeparateTables.

/**
 * Tests that insert in two tables with identity pk does not generate a
 * conflict. See CAY-341 for the original bug.
 */
@Test
public void testMultipleNewObjectsSeparateTables() throws Exception {
    GeneratedColumnTestEntity idObject1 = context.newObject(GeneratedColumnTestEntity.class);
    idObject1.setName("o1");
    GeneratedColumnTest2 idObject2 = context.newObject(GeneratedColumnTest2.class);
    idObject2.setName("o2");
    context.commitChanges();
}
Also used : GeneratedColumnTest2(org.apache.cayenne.testdo.generated.GeneratedColumnTest2) GeneratedColumnTestEntity(org.apache.cayenne.testdo.generated.GeneratedColumnTestEntity) Test(org.junit.Test)

Aggregations

GeneratedColumnTest2 (org.apache.cayenne.testdo.generated.GeneratedColumnTest2)1 GeneratedColumnTestEntity (org.apache.cayenne.testdo.generated.GeneratedColumnTestEntity)1 Test (org.junit.Test)1