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

Property setting with null has different behavior between add and update

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.3.4
    • Fix Version/s: 3.5.0
    • Component/s: process
    • Labels:

      Description

      Demonstrated via:

      gremlin> graph = TinkerFactory.createModern()
      ==>tinkergraph[vertices:6 edges:6]
      gremlin> g = graph.traversal()
      ==>graphtraversalsource[tinkergraph[vertices:6 edges:6], standard]
      gremlin> g.V(1).property("x", 1).property("y", null).property("z", 2)
      The AddPropertyStep does not have a provided value: AddPropertyStep({key=[y]})
      Type ':help' or ':h' for help.
      Display stack trace? [yN]N
      gremlin> g.V(1).properties()
      ==>vp[name->marko]
      ==>vp[x->1]
      ==>vp[age->29]
      gremlin> g.addV("test").property("x", 1).property("y", null).property("z", 2)
      ==>v[13]
      gremlin> g.V(13).properties()
      ==>vp[x->1]
      ==>vp[z->2]
      

      Make the AddVertexStep have similar functionality to AddPropertyStep...or the other way around.

      Added the breaking label here as either change will mean a change in behavior.

      Originally described here:

      https://groups.google.com/d/msg/gremlin-users/f1IHGb12eGY/i3UbaquXCAAJ

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spmallette stephen mallette
                Reporter:
                spmallette stephen mallette
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: