Try getting a child object by ID if it isn't found as property. This is due to the
change in helma.objectmodel.db.Node.getProperty() where child nodes are only returned as properties if either accessName or groupby is specified. http://helma.org/bugs/show_bug.cgi?id=315
This commit is contained in:
parent
0e76a161a1
commit
6170e10a5a
1 changed files with 5 additions and 0 deletions
|
@ -300,7 +300,12 @@ public class HopObject extends ScriptableObject implements Wrapper {
|
|||
if (id instanceof Number) {
|
||||
n = get(((Number) id).intValue(), this);
|
||||
} else if (id != null) {
|
||||
// try to get as property first
|
||||
n = getFromNode(id.toString());
|
||||
// then try to get child object by id
|
||||
if (n == null) {
|
||||
n = jsFunction_getById(id);
|
||||
}
|
||||
}
|
||||
|
||||
// since we're calling Scriptable.get() methods, we'll get NOT_FOUND rather
|
||||
|
|
Loading…
Add table
Reference in a new issue