You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Jorge Bay (JIRA)" <ji...@apache.org> on 2017/11/17 08:53:00 UTC
[jira] [Created] (TINKERPOP-1837) Gremlin .NET: Provide type
coercion between IDictionary instances
Jorge Bay created TINKERPOP-1837:
------------------------------------
Summary: Gremlin .NET: Provide type coercion between IDictionary<K, V> instances
Key: TINKERPOP-1837
URL: https://issues.apache.org/jira/browse/TINKERPOP-1837
Project: TinkerPop
Issue Type: Improvement
Components: dotnet
Affects Versions: 3.2.6, 3.3.0
Reporter: Jorge Bay
Fix For: 3.2.7, 3.3.1
As [described on the mailing list|https://lists.apache.org/thread.html/368c4aa3b37ef9628a3af612aece93fe9ca1914e3b3393e7e2e9fbdd@%3Cdev.tinkerpop.apache.org%3E], the limitation for of the specification combined with the strictness of .NET generics, makes dealing with maps on the .NET GLV hard / impossible.
All methods returning a map have this issue, as in the following example:
{code}
IDictionary<string, IList<int>> result = g.V().ValueMap<IList<int>>("age").Next();
{code}
Causes an exception at runtime:
{code}
System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.Object,System.Object]' to type 'System.Collections.Generic.IDictionary`2[System.String,System.Collections.Generic.IList`2[System.Int32]]'.
{code}
We should provide conversion mechanism inside the default traversal.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)