DataContext context = createDataContext();
GeneratedColumnCompMaster master = context
.newObject(GeneratedColumnCompMaster.class);
master.setName(masterName);
GeneratedColumnCompKey dep1 = context
.newObject(GeneratedColumnCompKey.class);
dep1.setName(depName1);
dep1.setToMaster(master);
GeneratedColumnCompKey dep2 = context
.newObject(GeneratedColumnCompKey.class);
dep2.setName(depName2);
dep2.setToMaster(master);
context.commitChanges();
int masterId = DataObjectUtils.intPKForObject(master);
ObjectId id2 = dep2.getObjectId();
// check propagated id
Number propagatedID2 = (Number) id2.getIdSnapshot().get(
GeneratedColumnCompKey.PROPAGATED_PK_PK_COLUMN);
assertNotNull(propagatedID2);