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

Support self-looping edges in IO

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0-incubating
    • 3.1.1-incubating
    • io
    • None

    Description

      Seems like GraphSON is having trouble with self-loops. Not sure about other IO at this time.

      gremlin> a = TinkerGraph.open()
      ==>tinkergraph[vertices:0 edges:0]
      gremlin> v1 = a.addVertex()
      ==>v[0]
      gremlin> v2 = a.addVertex()
      ==>v[1]
      gremlin> control = v1.addEdge("CONTROL", v2)
      ==>e[2][0-CONTROL->1]
      gremlin> selfLoop = v1.addEdge("SELF-LOOP", v1)
      ==>e[3][0-SELF-LOOP->0]
      gremlin> a.io(IoCore.graphson()).writeGraph("test.gson")
      ==>null
      gremlin> b = TinkerGraph.open()
      ==>tinkergraph[vertices:0 edges:0]
      gremlin> b.io(IoCore.graphson()).readGraph("test.gson")
      ==>null
      gremlin> b.traversal().E()
      ==>e[2][0-CONTROL->1]
      

      with graphson of:

      {"id":0,"label":"vertex","inE":{"SELF-LOOP":[{"id":3,"outV":0}]},"outE":{"CONTROL":[{"id":2,"inV":1}]}}
      {"id":1,"label":"vertex","inE":{"CONTROL":[{"id":2,"outV":0}]}}
      

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            spmallette Stephen Mallette
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: