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:
hns 2003-12-02 15:49:39 +00:00
parent 0e76a161a1
commit 6170e10a5a

View file

@ -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