1000), true, ObjectIdQuery.CACHE_REFRESH);
assertEquals(1, context.performQuery(q).size());
}
public void testGeneratedKey() throws Exception {
MeaningfulPKTest1 obj = (MeaningfulPKTest1) context
.newObject("MeaningfulPKTest1");
obj.setDescr("aaa-aaa");
context.commitChanges();
assertNotNull(obj.getPkAttribute());
assertSame(obj, DataObjectUtils.objectForPK(context, MeaningfulPKTest1.class, obj
.getPkAttribute()));
int id = DataObjectUtils.intPKForObject(obj);
Map snapshot = context.getObjectStore().getDataRowCache().getCachedSnapshot(
obj.getObjectId());
assertNotNull(snapshot);
assertTrue(snapshot.containsKey(MeaningfulPKTest1.PK_ATTRIBUTE_PK_COLUMN));
assertEquals(new Integer(id), snapshot
.get(MeaningfulPKTest1.PK_ATTRIBUTE_PK_COLUMN));
}