Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-1837

Gremlin .NET: Provide type coercion between IDictionary<K, V> instances

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.0, 3.2.6
    • Fix Version/s: 3.2.7, 3.3.1
    • Component/s: dotnet
    • Labels:
      None

      Description

      As described on the mailing list, 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:

      IDictionary<string, IList<int>> result = g.V().ValueMap<IList<int>>("age").Next();
      

      Causes an exception at runtime:

      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]]'.
      

      We should provide conversion mechanism inside the default traversal.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jorgebg Jorge Bay
                Reporter:
                jorgebg Jorge Bay
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: