ClientConnection connection = new LocalConnection(csChannel);
ClientChannel channel = new ClientChannel(connection);
CayenneContext context = new CayenneContext(channel);
ClientMtReflexive o1 = context.newObject(ClientMtReflexive.class);
o1.setName("parent");
ClientMtReflexive o2 = context.newObject(ClientMtReflexive.class);
o2.setName("child");
o2.setToParent(o1);
context.commitChanges();
context.deleteObject(o1);
context.deleteObject(o2);
context.commitChanges();