DataContext context = createDataContext();
GeneratedColumnTestEntity master1 = context
.newObject(GeneratedColumnTestEntity.class);
master1.setName("aaa");
GeneratedColumnDep dependent = context
.newObject(GeneratedColumnDep.class);
dependent.setName("aaa");
dependent.setToMaster(master1);
context.commitChanges();
// change master
GeneratedColumnTestEntity master2 = context
.newObject(GeneratedColumnTestEntity.class);
master2.setName("bbb");
// TESTING THIS
dependent.setToMaster(master2);
context.commitChanges();
int id1 = DataObjectUtils.intPKForObject(master2);
assertTrue(id1 >= 0);