From 0e76a161a11dee7a9bb8a715ed94a04c45ec79ad Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 2 Dec 2003 15:48:18 +0000 Subject: [PATCH] Only try to get child node as property if either accessName or groupby is specified. This fixes http://helma.org/bugs/show_bug.cgi?id=315 --- src/helma/objectmodel/db/Node.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index 90917493..0e80b27b 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -1133,14 +1133,6 @@ public final class Node implements INode, Serializable { return null; } - /* - DbMapping smap = null; - - if (dbmap != null) { - smap = dbmap.getSubnodeMapping(); - } - */ - Node retval = null; if (subnodes.size() > index) { @@ -1675,10 +1667,12 @@ public final class Node implements INode, Serializable { // 3) try to get the property from the database via accessname, if defined + // (only do this if accessname or groupby is specified) if (rel == null && dbmap != null && state != TRANSIENT) { rel = dbmap.getSubnodeRelation(); - if (rel != null && rel.otherType != null) { + if (rel != null && rel.otherType != null && + (rel.groupby != null || rel.accessName != null)) { Node n = nmgr.getNode(this, propname, rel); if (n != null) {