You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/20 02:36:00 UTC

[jira] [Commented] (TINKERPOP-2280) Prevent use of T values as property key overloads

    [ https://issues.apache.org/jira/browse/TINKERPOP-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933964#comment-16933964 ] 

ASF GitHub Bot commented on TINKERPOP-2280:
-------------------------------------------

spmallette commented on pull request #1195: TINKERPOP-2280 Add ReservedKeysVerificationStrategy
URL: https://github.com/apache/tinkerpop/pull/1195
 
 
   https://issues.apache.org/jira/browse/TINKERPOP-2280
   
   Abstracted out a "warning" style verification strategy that ended up being used by this new strategy and EdgeLabelVerificationStrategy. If this ReservedKeysVerificationStrategy is added it will prevent the specified keys from being used in property keys. Providers can choose to implement this strategy if they have keywords they wish to prevent use of and users can of course use it as needed for their own conventions. By default, the strategy blocks use of "id" and "label" as a convention.
   
   All tests pass with `docker/build.sh -t -n -i`
   
   VOTE +1
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Prevent use of T values as property key overloads
> -------------------------------------------------
>
>                 Key: TINKERPOP-2280
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2280
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: structure
>    Affects Versions: 3.3.8
>            Reporter: stephen mallette
>            Assignee: stephen mallette
>            Priority: Major
>
> 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:
> {code}
> gremlin> g.V().has('label').valueMap(true)
> ==>[id:13,label:[thing],label:person]
> {code}
> 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}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)