graphaware / neo4j-uuid

GraphAware Runtime Module that assigns a UUID to all nodes (and relationships) in the graph transparently
103 stars 22 forks source link

relationship uuid generation #14

Closed ahuwaa closed 8 years ago

ahuwaa commented 8 years ago

this is great for generating nodes for uuids, but is there a way to also generate uuids for relationships?

bachmanm commented 8 years ago

there isn't currently, but it should be a trivial addition - do you wanna have a go and issue a PR? :)

Joshfindit commented 8 years ago

If you point the way, I'll have a go.

Also on the table: sane defaults for when UUID is added to a relationship (default: always?)

rmarlow commented 8 years ago

I'll second this issue, UUIDs on relationships would be great. No promises, but I'll look into issuing a PR if I get the chance.

mikeytag commented 8 years ago

I'll third this issue. It's unfortunate that relationship properties aren't indexed in Neo4j so it has limited use, but if they ever do allow indexing on relationship properties we'll be immediately ready to go with our UUIDs!

bachmanm commented 8 years ago

Ok guys, this is gonna get built very soon!

mikeytag commented 8 years ago

w00t!

bachmanm commented 8 years ago

released in 2.3.2.37.8

Joshfindit commented 8 years ago

Bravo! Thank you!

ikwattro commented 8 years ago

For those wondering what the fqdn is for assigning a uuid to all relationships, here it is :

com.graphaware.common.policy.all.IncludeAllRelationships

bachmanm commented 8 years ago

or com.graphaware.runtime.policy.all.IncludeAllBusinessRelationships

The difference is that if GraphAware Framework is writing some "hidden" relationships, perhaps because you are using another module, these are excluded by the policy above. But if UUID is your only module, then they have the same effect. Actually @ikwattro's suggestion will perform slightly better.