[ 
https://issues.apache.org/jira/browse/TINKERPOP-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom Brown updated TINKERPOP-2331:
---------------------------------
    Description: 
It looks like dotnet version does not support selecting multiple vertices by 
aliases and following syntax always throws an exception

Select("key1", "key2").By(__.ValueMap(true))

System.InvalidCastException: 'Unable to cast object of type 
'System.Collections.Generic.Dictionary`2[System.Object,System.Object]' to type 
'Gremlin.Net.Structure.Vertex'.'

 

*Steps to reproduce:*

_1. Create following test graph_

graph = TinkerGraph.open();
 g = graph.traversal();
g.addV().property("name", "B").
 addV().property("name", "A");

 

_2. Query from Gremlin console to verify that query syntax is OK_

g.V().has("name", "A").as("a").out().has("name", "B").as("b").select("a", 
"b").by(valueMap(true))

 

_3. Query from .net to get an exception_

g.V().Has("name", "A").As("a").Out().Has("name", "B").as("b").Select("a", 
"b").By(__.ValueMap<object, object>(true)).ToList()

 

  was:
It looks like dotnet version does not support following syntax

Select("key1", "key2").By(__.ValueMap(true))

and always throws an exception

System.InvalidCastException: 'Unable to cast object of type 
'System.Collections.Generic.Dictionary`2[System.Object,System.Object]' to type 
'Gremlin.Net.Structure.Vertex'.'

 

*Steps to reproduce:*

_1. Create following test graph_ 

graph = TinkerGraph.open();
g = graph.traversal();
g.V().drop();
g.addV().property("name", "B").
addV().property("name", "A");

 

_2. Query from Gremlin console to verify that query syntax is OK_

g.V().has("name", "A").as("a").out().has("name", "B").as("b").select("a", 
"b").by(valueMap(true))

 

_3. Query from .net to get an exception_

g.V().Has("name", "A").As("a").Out().Has("name", "B").as("b").Select("a", 
"b").By(__.ValueMap<object, object>(true)).ToList()

 


> Select(<multiple keys>).By(__ValueMap(true)) throws "Unable to cast" exception
> ------------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2331
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2331
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: dotnet
>    Affects Versions: 3.4.4
>            Reporter: Tom Brown
>            Priority: Major
>
> It looks like dotnet version does not support selecting multiple vertices by 
> aliases and following syntax always throws an exception
> Select("key1", "key2").By(__.ValueMap(true))
> System.InvalidCastException: 'Unable to cast object of type 
> 'System.Collections.Generic.Dictionary`2[System.Object,System.Object]' to 
> type 'Gremlin.Net.Structure.Vertex'.'
>  
> *Steps to reproduce:*
> _1. Create following test graph_
> graph = TinkerGraph.open();
>  g = graph.traversal();
> g.addV().property("name", "B").
>  addV().property("name", "A");
>  
> _2. Query from Gremlin console to verify that query syntax is OK_
> g.V().has("name", "A").as("a").out().has("name", "B").as("b").select("a", 
> "b").by(valueMap(true))
>  
> _3. Query from .net to get an exception_
> g.V().Has("name", "A").As("a").Out().Has("name", "B").as("b").Select("a", 
> "b").By(__.ValueMap<object, object>(true)).ToList()
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to