I probably should have added this yesterday when I replied but +1 to local uniqueness for vertex property identifiers. kinda surprised that we didn't have this enforced already in the test suite.
On Wed, Sep 12, 2018 at 3:14 PM Stephen Mallette <[email protected]> wrote: > that much actually makes sense - the problem is the TinkerGraph default > configuration and Java Number Brain Damage > > On Wed, Sep 12, 2018 at 3:12 PM Robert Dale <[email protected]> wrote: > >> Very strange indeed... >> >> gremlin> g = TinkerGraph.open().traversal() >> ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] >> gremlin> g.addV().property('name','marko') >> ==>v[0] >> gremlin> g.addV().property(single, 'name', 'stephen', id, 4L) >> ==>v[2] >> gremlin> g.addV().property('name','daniel') >> ==>v[3] >> gremlin> g.V().valueMap(true) >> ==>[id:0,label:vertex,name:[marko]] >> ==>[id:2,label:vertex,name:[stephen]] >> ==>[id:3,label:vertex,name:[daniel]] >> gremlin> g.V().properties().valueMap(true) >> ==>[id:1,key:name,value:marko] >> ==>[id:4,key:name,value:stephen] >> ==>[id:4,key:name,value:stephen] >> >> v3.3.3 >> >> Robert Dale >> >> >> On Wed, Sep 12, 2018 at 2:21 PM Daniel Kuppitz <[email protected]> wrote: >> >> > Right now we don't enforce uniqueness of property ids, which can lead to >> > very weird results: >> > >> > gremlin> g = TinkerGraph.open().traversal() >> > ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] >> > gremlin> g.addV().property(single, 'foo', 'bar', id, 1).property(single, >> > 'bar', 'baz', id, 1) >> > ==>v[0] >> > gremlin> g.V().properties().hasId(1) >> > ==>vp[bar->baz] >> > ==>vp[bar->baz] >> > >> > >> > If we allow users to manually specify property ids, the above query >> should >> > throw an exception. >> > >> > IMO, local uniqueness should be enough (given alone the complexity it >> would >> > require to ensure global uniqueness). >> > >> > Thoughts? Objections? More/other suggestions? >> > >> > Cheers, >> > Daniel >> > >> >
