Description
When Shop has a 1:1 reference and cascading delete for all references will be enabled, an exception occur when the 1:1 reference is empty.
tx.begin();
// now we enable cascading delete
tx.setCascadingDelete(Shop.class, true);
database.deletePersistent(s);
tx.commit();