Search in sources :

Example 1 with DecimalPKTest1

use of org.apache.cayenne.testdo.numeric_types.DecimalPKTest1 in project cayenne by apache.

the class NumericTypesIT method testDecimalPK1.

@Test
public void testDecimalPK1() throws Exception {
    // populate (testing insert as well)
    DecimalPKTest1 object = context.newObject(DecimalPKTest1.class);
    object.setName("o2");
    object.setDecimalPK(1.25);
    context.commitChanges();
    ObjectId syntheticId = new ObjectId("DecimalPKTest1", "DECIMAL_PK", 1.25);
    assertSame(object, context.getGraphManager().getNode(syntheticId));
}
Also used : ObjectId(org.apache.cayenne.ObjectId) DecimalPKTest1(org.apache.cayenne.testdo.numeric_types.DecimalPKTest1) Test(org.junit.Test)

Aggregations

ObjectId (org.apache.cayenne.ObjectId)1 DecimalPKTest1 (org.apache.cayenne.testdo.numeric_types.DecimalPKTest1)1 Test (org.junit.Test)1