Only call Relation.checkConstraints() in isParentOf() if the subnode relation does
not have a filter set, because checkConstraints() always returns false in that case.
This commit is contained in:
parent
38c9d74be6
commit
08c443ce6a
1 changed files with 7 additions and 4 deletions
|
@ -1357,10 +1357,13 @@ public final class Node implements INode, Serializable {
|
|||
if (dbmap != null) {
|
||||
Relation subrel = dbmap.getSubnodeRelation();
|
||||
// if we're dealing with relational child nodes use
|
||||
// Relation.checkConstraints to avoid loading the child index
|
||||
if (subrel != null &&
|
||||
subrel.otherType != null &&
|
||||
subrel.otherType.isRelational()) {
|
||||
// Relation.checkConstraints to avoid loading the child index.
|
||||
// Note that we only do that if no filter is set, since
|
||||
// Relation.checkConstraints() would always return false
|
||||
// if there was a filter property.
|
||||
if (subrel != null && subrel.otherType != null
|
||||
&& subrel.otherType.isRelational()
|
||||
&& subrel.filter == null) {
|
||||
return subrel.checkConstraints(this, n);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue