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
This commit is contained in:
parent
224085c159
commit
0e76a161a1
1 changed files with 3 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue