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

Prevent use of T values as property key overloads

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.3.8
    • Fix Version/s: 3.3.9, 3.4.4, 3.5.0
    • Component/s: structure
    • Labels:
      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.

      Daniel Kuppitz 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

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

              Dates

              • Created:
                Updated:
                Resolved: