mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#994 - @OneToOne cacade does not honor orphanRemoval = true
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user