Description
This bit of Gremlin demonstrates both problems for uses of by(String):
gremlin> g.V().valueMap().project('x').by('name') java.util.LinkedHashMap cannot be cast to org.apache.tinkerpop.gremlin.structure.Element Type ':help' or ':h' for help. Display stack trace? [yN]n
First, users typically expect this to work because they figure they are just grabbing a keys value from a Map and then get the difficult to understand message which doesn't tell you how to resolve. As a side note, the way to resolve is with:
gremlin> g.V().valueMap().project('x').by(select('name')) ==>[x:[marko]] ==>[x:[stephen]] ==>[x:[matthias]] ==>[x:[daniel]] ==>[x:[gremlin]] ==>[x:[tinkergraph]]
Attachments
Issue Links
- links to