Not possible to restrict relationships?

(Michael Porter) #1

I know it's possible to create uniqueness constraints on node labels, relationship properties, etc. However, there does not seem to be a way to enforce a uniqueness constraint on a number or relationships. I've seen some work arounds mentioned on Stack Overflow but nothing from the official documentation.

Has anyone found a proper way to restrict the number of relationships a node can have?

(Michael Hunger) #2

It's still on the roadmap. Our friends from GraphAware have finished a solution I once suggested using a transaction even handler.

see here https://github.com/graphaware/neo4j-framework/tree/master/runtime

(Michael Porter) #3

Thank you, will check it out.