I have a graph with the following structure:
|-ProductFit
|-|-Part
|-|-App
|-|-|-ProductID
|-|-|-ProductModelID
|-|-|-ProductYearID
|-ProductID
|-|-ProductName
|-|-ProductModelID
|-|-ProductYearID
|-ProductModelID
|-|-ProductModelName
|-ProductYearID
|-|-ProductYear
where ProductFit is my first independent vertex and ProductID, ProductModelID and ProductYearID as my connected vertices.
Now, there are some fields of ProductID's in ProductFit having wrong values for which I need to get values from other vertex of ProductID.
Here is my query:
g.V().has('ProductFit','Part','PA01').properties('App')
.valueMap('ProductID','ProductModelID','ProductYearID')
.choose(values('ProductModelID'))
.option(PM01, g.V().has('ProductFit','Part','PA01').properties('App').values('ProductModelID'))
.option(PM02, g.V().has('ProductID','ProductModelID','PM01'))
.values('ProductModelID')
But this is giving me this error:
java.util.HashMap cannot be cast to org.apache.tinkerpop.gremlin.structure.Element
Is it that I can't go from one vertex to other during traversal or is there some problem in query? TIA.