Robert Green MBA
Robert Green MBA

Reputation: 1876

Gremlin how do I get the outV of Edge?

Let's say I want to filter my Edges by the outV.

Can't seem to figure out what to do after g.E().hasLabel('HasGeneralPhoneLineType')

I've tried:

g.E().hasLabel('HasGeneralPhoneLineType').has('outV','42495ed9-7026-4ba4-9b64-4b05fc860bb0')

and

g.E().hasLabel('HasGeneralPhoneLineType').outV() gives me back the Vertexes but then how do I filter to get a specific vertex if I know the ID? Something like g.E().hasLabel('HasGeneralPhoneLineType').outV('abc-123') or g.E().hasLabel('HasGeneralPhoneLineType').outV().hasId('abc-123') or something like that??!?! idk...

enter image description here

Upvotes: 1

Views: 373

Answers (1)

Kelvin Lawrence
Kelvin Lawrence

Reputation: 14371

You almost had it in your other experiments. Try this

g.E().hasLabel('HasGeneralPhoneLineType').
      where(outV().hasId('abc-123'))

Upvotes: 2

Related Questions