Yes. That is allowed. Again, see Features.
You can do Features.supportsList(); (I forget the exact method). Take care, Marko. http://markorodriguez.com On Oct 27, 2015, at 9:16 PM, Mike Personick <[email protected]> wrote: > Ok thanks Marko. But just to be clear - you could have a key with list > cardinality with multi-properties - that is to say, multiple lists, right? > Like for example, if the <V> in Vertex.property was a List? I assume this > would be quite an unusual case and I'm not sure why anyone would want to do > it, but it still needs to be supported? > > Vertex v = ... > v.property(Cardinality.list, "prop", Arrays.asList("a", "b", "c")); > v.property(Cardinality.list, "prop", Arrays.asList("d", "e", "f")); > > > > On Tue, Oct 27, 2015 at 6:20 PM, Marko Rodriguez <[email protected]> > wrote: > >> Hi Mike, >> >> One more thing to add --- multi-properties are NOT lists. They are >> multiple properties of the same key. If you want a key->list[1,2,3] that is >> a value of list. That is also a Feature. I suspect you don't want that as >> that is typically not what is desired. You want: >> >> name->marko >> name->marko2 >> name->marko3 >> >> That is a "list" of multiple properties not a single property with value >> list :D >> >> Get it?, >> Marko. >> >> http://markorodriguez.com >> >> On Oct 27, 2015, at 6:11 PM, Marko Rodriguez <[email protected]> wrote: >> >>> Hi, >>> >>>>>> v.property(single,"name","marko") >>>> >>>> But with multi-properties, would this not just mean add another single >>>> value for name="marko"? We just established earlier in the conversation >>>> that you can have multiple single-valued properties, and that these >>>> multi-properties can even be the same value. >>> >>> If you want to replace "name", its single. >>> If you want to add a new "name," its list. >>> If you want to add a new "name" (repeats not allowed), its set. >>> >>> Play with TinkerGraph and see: >>> >>> gremlin> graph = TinkerGraph.open() >>> ==>tinkergraph[vertices:0 edges:0] >>> gremlin> v = graph.addVertex() >>> ==>v[0] >>> gremlin> v.property(single,'name','marko') >>> ==>vp[name->marko] >>> gremlin> v.properties() >>> ==>vp[name->marko] >>> gremlin> v.property(single,'name','marko2') >>> ==>vp[name->marko2] >>> gremlin> v.properties() >>> ==>vp[name->marko2] >>> gremlin> v.property(list,'name','marko') >>> ==>vp[name->marko] >>> gremlin> v.properties() >>> ==>vp[name->marko2] >>> ==>vp[name->marko] >>> gremlin> v.property(list,'name','marko3') >>> ==>vp[name->marko3] >>> gremlin> v.properties() >>> ==>vp[name->marko2] >>> ==>vp[name->marko] >>> ==>vp[name->marko3] >>> gremlin> v.property(single,'name','marko4') >>> ==>vp[name->marko4] >>> gremlin> v.properties() >>> ==>vp[name->marko4] >>> gremlin> v.property(set,'name','marko5') >>> ==>vp[name->marko5] >>> gremlin> v.properties() >>> ==>vp[name->marko4] >>> ==>vp[name->marko5] >>> gremlin> v.property(set,'name','marko5') >>> ==>vp[name->marko5] >>> gremlin> v.properties() >>> ==>vp[name->marko4] >>> ==>vp[name->marko5] >>> gremlin> >>> >>> HTH, >>> Marko. >>> >>> http://markorodriguez.com >> >>
