mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#894 - ENH: Add support for @OneToMany orphanRemoval = true (which is the same as @PrivateOwned)
This commit is contained in:
@@ -55,6 +55,10 @@ class AnnotationAssocManys extends AnnotationParser {
|
||||
OneToMany oneToMany = get(prop, OneToMany.class);
|
||||
if (oneToMany != null) {
|
||||
readToOne(oneToMany, prop);
|
||||
if (oneToMany.orphanRemoval()) {
|
||||
prop.setModifyListenMode(ModifyListenMode.REMOVALS);
|
||||
prop.getCascadeInfo().setDelete(true);
|
||||
}
|
||||
PrivateOwned privateOwned = get(prop, PrivateOwned.class);
|
||||
if (privateOwned != null) {
|
||||
prop.setModifyListenMode(ModifyListenMode.REMOVALS);
|
||||
|
||||
Reference in New Issue
Block a user