From 08c443ce6a2f17e75d0dc4449968ffde58da6edc Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 27 Feb 2004 14:45:49 +0000 Subject: [PATCH] Only call Relation.checkConstraints() in isParentOf() if the subnode relation does not have a filter set, because checkConstraints() always returns false in that case. --- src/helma/objectmodel/db/Node.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index 2bdcfce8..e44fff0e 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -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); } }