Search in sources :

Example 1 with MeaningfulPKDep

use of org.apache.cayenne.testdo.meaningful_pk.MeaningfulPKDep in project cayenne by apache.

the class DataContextEntityWithMeaningfulPKIT method testToManyRelationshipWithMeaningfulPK2.

@Test
public void testToManyRelationshipWithMeaningfulPK2() {
    MeaningfulPKTest1 obj = context.newObject(MeaningfulPKTest1.class);
    obj.setPkAttribute(1000);
    obj.setDescr("aaa-aaa");
    context.commitChanges();
    // must be able to set reverse relationship
    MeaningfulPKDep dep = context.newObject(MeaningfulPKDep.class);
    dep.setToMeaningfulPK(obj);
    context.commitChanges();
}
Also used : MeaningfulPKDep(org.apache.cayenne.testdo.meaningful_pk.MeaningfulPKDep) MeaningfulPKTest1(org.apache.cayenne.testdo.meaningful_pk.MeaningfulPKTest1) Test(org.junit.Test)

Aggregations

MeaningfulPKDep (org.apache.cayenne.testdo.meaningful_pk.MeaningfulPKDep)1 MeaningfulPKTest1 (org.apache.cayenne.testdo.meaningful_pk.MeaningfulPKTest1)1 Test (org.junit.Test)1