#994 - @OneToOne cacade does not honor orphanRemoval = true

This commit is contained in:
Rob Bygrave committed 2018-02-20 16:59:55 +13:00
1 parent 81d48d67a7
commit 3e8b06e38e
8 files changed
+229 -1

No files matched your search

@@ -1173,6 +1173,15 @@ public final class DefaultPersister implements Persister {
}
}
}
for (BeanPropertyAssocOne<?> prop : desc.propertiesOneExportedSave()) {
if (prop.isOrphanRemoval() && request.isDirtyProperty(prop)) {
Object origValue = request.getOrigValue(prop);
if (origValue instanceof EntityBean) {
delete((EntityBean) origValue, request.getTransaction(), true);
}
}
}
}
/**