Bugzilla – Bug 663
HopObject.getCollection() not respecting "accessname"
Last modified: 2009-07-30 11:49:06
You need to log in before you can comment on or make changes to this bug.
Created an attachment (id=111) [details] error when retrieving HopObj by accessname on programmatic collection getting HopObjects by accessname does not work for programmatic collections created with getCollection(). i tried the minimal case HopObject.getCollection({"accessname": "ALIAS"}).get("validalias") and more complex ones, all fail with "Error retrieving Node" - see strace attached.
also note that a normal collection fails silently (and returns null) when no object with the requested accessname exists
probably related: this throws NPE when trying to load the one story with an accessname, all other stories before and after that are loaded correctly: {{{ var coll = Story.getCollection( {"alias": "STO_ALIAS"} ); coll.list(0,10); }}} [2009/05/11 12:18:33] [ERROR] [ws2fm4-1] Error in prefetchNodes() java.lang.NullPointerException at helma.objectmodel.db.DbKey.hashCode(DbKey.java:82) at helma.objectmodel.db.SyntheticKey.hashCode(SyntheticKey.java:77) at java.util.HashMap.put(HashMap.java:418) at helma.util.CacheMap.put(CacheMap.java:243) at helma.swarm.SwarmCache.put(SwarmCache.java:221) at helma.objectmodel.db.NodeManager.registerNewNode(NodeManager.java:357) at helma.objectmodel.db.NodeManager.prefetchNodes(NodeManager.java:1318) at helma.objectmodel.db.WrappedNodeManager.prefetchNodes(WrappedNodeManager.java:167) at helma.objectmodel.db.SubnodeList.prefetch(SubnodeList.java:157) at helma.objectmodel.db.Node.prefetchChildren(Node.java:1576) at helma.scripting.rhino.HopObject.prefetchChildren(HopObject.java:449) at helma.scripting.rhino.HopObject.jsFunction_list(HopObject.java:502)