You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Daniel Kuppitz (JIRA)" <ji...@apache.org> on 2016/01/19 22:00:40 UTC
[jira] [Created] (TINKERPOP-1090) Dynamic vertex by id lookups
Daniel Kuppitz created TINKERPOP-1090:
-----------------------------------------
Summary: Dynamic vertex by id lookups
Key: TINKERPOP-1090
URL: https://issues.apache.org/jira/browse/TINKERPOP-1090
Project: TinkerPop
Issue Type: Improvement
Components: process
Affects Versions: 3.1.0-incubating
Reporter: Daniel Kuppitz
{noformat}
gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), 0L).iterate().toString()
==>[InjectStep([0])@[id], TinkerGraphStep(vertex,[~id.eq(0)])]
gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), select("id")).iterate().toString()
==>[InjectStep([0])@[id], TinkerGraphStep([],vertex), TraversalFilterStep([PropertiesStep([~id],value), SelectOneStep(id)])]
gremlin> g.inject(0L).as("id").V().has(id, select("id")).iterate().toString()
==>[InjectStep([0])@[id], TinkerGraphStep(vertex,[~id.eq([SelectOneStep(id)])])]
{noformat}
The last compiled query is wrong, because we don't have a method overload for {{has(accessor, traversal)}}. The second one looks good and should return the same result as the first one, but its result is always empty.
{noformat}
gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), 0L)
==>v[0]
gremlin> g.inject(0L).as("id").V().has(id.getAccessor(), select("id"))
gremlin>
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)