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

Prevent use of T values as property key overloads

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Done
    • 3.3.8
    • 3.3.9, 3.4.4, 3.5.0
    • structure
    • None

    Description

      It's not a great practice but we often see folks overloading "label" and "id" as property keys on elements. The problem here is that `valueMap()` will tend to end up looking like this:

      gremlin> g.V().has('label').valueMap(true)
      ==>[id:13,label:[thing],label:person]
      

      There was an idea to alter the toString() representation of T values but that didn't seem right after it was done and it's hard to say what implications that would have to users. Who knows how T was used at this point.

      dkuppitz suggested that this issue was akin to EdgeLabelVerificationStrategy which is a much less intrusive way to deal with the problem, especially going back to 3.3.x. For 3.5.0 we could even install this strategy by default as we expected to do with EdgeLabelVerificationStrategy

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: