Hello, So the votes are in and as any other evil dictatorship would do, your votes are ignored and we stick with Cardinality.list.
Just kidding… The change was made and pushed to master/. VENDORS: Note that this required the default methods in Vertex to change -- meaning, what was default is now not and vice versa. All that is required now is the implementation of Vertex.property(Cardinality,String,Object,Object[]). The others are defaults of this (which actually makes more sense as this is the most general method). Thanks everyone, Marko. http://markorodriguez.com On Mar 20, 2015, at 11:14 AM, Matt Frantz <[email protected]> wrote: > My preference: Cardinality.single > > Since property values can be arbitrary types (subject to vendor > restrictions), I consider the alternate cardinalities to be sugar, albeit > admittedly convenient shorthand when updating existing collection-valued > properties. > > Slight tangent: It would be nice to see some type extensibility here. For > example, if you want a property to have a histogram, then you could register > a histogram type with an appropriate Java interface, or with a lambda that > describes what happens when a value is added, analogous to the withSack API. > Graph vendors could add value by providing a set of property types that have > good performance characteristics. > > On Friday, March 20, 2015 at 9:13:13 AM UTC-7, Marko A. Rodriguez wrote: > Hello, > > In TinkerPop3, vertices can have multi-properties of the same key. These are > called "vertex properties." > > > http://tinkerpop.incubator.apache.org/docs/3.0.0-SNAPSHOT/#vertex-properties > > When you create a VertexProperty, you can provide a cardinality. For instance: > > vertex.property(single,'name','stephen') // if a property of name > already exists, delete it and add stephen. > vertex.property(list,'name','stephen') // add a new name property to > vertex -- ignoring whether a name property already exists. > vertex.property(set,'name','stephen') // if the name 'stephen' already > exists, do not add a new property > > The question is -- what is: > > vertex.property('name','stephen') > > In other words, the default behavior. Right now, its Cardinality.list. > However, many people have stated that they would like it to be > Cardinality.single and thus, more aligned with TinkerPop2 and most graph > database vendors. > > This is something we will want to have down by TP3 GA -- so please voice your > thoughts. > > Thank you, > Marko. > > http://markorodriguez.com > > > -- > You received this message because you are subscribed to the Google Groups > "Gremlin-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/gremlin-users/6e80835c-e8fe-4270-8c74-696dfbbac6f1%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
