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

Property setting with null has different behavior between add and update

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.3.4
    • 3.5.0
    • process

    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

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

              Dates

                Created:
                Updated:
                Resolved: