context.commitChanges();
}
public void testCascadeToOneNewObject() {
ClientMtDeleteRule related = context.newObject(ClientMtDeleteRule.class);
context.commitChanges();
ClientMtDeleteCascade object = context.newObject(ClientMtDeleteCascade.class);
object.setName("object");
object.setCascade(related);
context.deleteObjects(object);
assertEquals(PersistenceState.TRANSIENT, object.getPersistenceState());
assertEquals(PersistenceState.DELETED, related.getPersistenceState());
assertFalse(context.deletedObjects().contains(object));
assertTrue(context.deletedObjects().contains(related));
context.commitChanges();
}