#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

@@ -37,6 +37,8 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
private final boolean oneToOneExported;
private final boolean orphanRemoval;
private final boolean importedPrimaryKey;
private final boolean primaryKeyExport;
@@ -76,6 +78,7 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
importedPrimaryKey = deploy.isImportedPrimaryKey();
oneToOne = deploy.isOneToOne();
oneToOneExported = deploy.isOneToOneExported();
orphanRemoval = deploy.isOrphanRemoval();
if (embedded) {
// Overriding of the columns and use table alias of owning BeanDescriptor
@@ -338,6 +341,10 @@ public class BeanPropertyAssocOne<T> extends BeanPropertyAssoc<T> {
return oneToOneExported;
}
public boolean isOrphanRemoval() {
return orphanRemoval;
}
/**
* If true this bean maps to the primary key.
*/