Friday 13 September 2013

unable to print write supplier name in a single gremlin query

unable to print write supplier name in a single gremlin query

unable to solve. I know the problem is behind first inV() while creating
vertex. while executing the first row in the result is ok. but when
iterating to next outE().inV..it again fetch node CP which should be ANZ
this time. buyer side is working fine.
gremlin>
g.v(0).outE().inV.as('supplier').bothE('Sell','Buy').as('tx_amount').inV.as('buyer').select{it.name}{it.amount}{it.name}.sort{it[2]}
==> [supplier:CP, tx_amount:100, buyer:ANZ]
==> [supplier:CP, tx_amount:200, buyer:CP]

No comments:

Post a Comment