mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1613 - When using transaction.setPersistCascade(false) ... a Delete query should not cascade
This commit is contained in:
1 parent
1d49e5b341
commit
26d1288757
9 files changed
+49
-7
No files matched your search
@@ -679,6 +679,13 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
|
||||
setSelectId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CQueryPlanKey setDeleteByIdsPlan() {
|
||||
// re-build plan for cascading via delete by ids
|
||||
queryPlanKey = queryPlanKey.withDeleteByIds();
|
||||
return queryPlanKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the select clause to select the Id property.
|
||||
*/
|
||||
|
||||
@@ -25,6 +25,11 @@ class OrmQueryPlanKey implements CQueryPlanKey {
|
||||
this.planHash = hc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CQueryPlanKey withDeleteByIds() {
|
||||
return new OrmQueryPlanKey(description + ":deleteByIds", 0, 0, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPartialKey() {
|
||||
return description;
|
||||
|
||||
Reference in new issue
Block a user