For the first position (at the start node), there is no relationship leading up to it, which means that the lastRelationship() method returns null. This is a special case that has to be dealt with.
Cheers, Tobias On Wed, Mar 23, 2011 at 9:05 PM, Justine Mathews <justine.math...@megree.com > wrote: > Tobias, > > > > I have used the return filter, I am getting following error when making > rest call for node traverse, > > Error : The remote server returned an error: (500) Internal Server Error. > > Response header status : *javax.script.ScriptException: > sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call method > "getProperty" of null (<Unknown Source>#1)* > > > > please find below the syntax, > > > > *url:* http://localhost:7474/db/data/node/80/traverse/node > > *traverse:* > > {"order": "depth first","relationships": [ > > { > > "type": "Friend", > > "direction": "all" > > } > > ],"return filter": { > > "language": "javascript", > > "body": "position.lastRelationship().hasProperty(\"customerId\");" > > },"max depth": 1} > > > > ยท *Kernel version* > > Neo4j - Graph Database Kernel 1.3.M03 > > > > > > -- > Regards, > Justine K Mathews, MCSD.NET > Mob: +44-(0) 7795268546 > > http://www.justinemathews.com > > http://uk.linkedin.com/in/justinemathews > > > -- Tobias Ivarsson <tobias.ivars...@neotechnology.com> Hacker, Neo Technology www.neotechnology.com Cellphone: +46 706 534857 _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user