use of org.apache.cayenne.testdo.numeric_types.DecimalPKTestEntity in project cayenne by apache.
the class NumericTypesIT method testDecimalPK.
@Test
public void testDecimalPK() throws Exception {
// populate (testing insert as well)
DecimalPKTestEntity object = context.newObject(DecimalPKTestEntity.class);
object.setName("o1");
object.setDecimalPK(new BigDecimal("1.25"));
context.commitChanges();
ObjectId syntheticId = new ObjectId("DecimalPKTestEntity", "DECIMAL_PK", new BigDecimal("1.25"));
assertSame(object, context.getGraphManager().getNode(syntheticId));
context.deleteObjects(object);
context.commitChanges();
}
Aggregations