UNIQUE Constraints for relationship for example Marriage (:Men)-[:MARRIED]-(:Women)

(:Men)-[:MARRIED]-(:Women)

One men should marry one women i want to force this in db how do i implement this using cypher query

Cardinality constraints are not yet implemented, you might see them in an upcoming release.

Meanwhile you can implement that behaviour yourself using a TransactionEventHandler.

1 Like

Hi Stefan -- Any news on implementing "Cardinality Constraints"? This would be very helpful for us to maintain the integrity of our schema. Will Neo4j 4.0 have this?

Unfortunately this won't be in 4.0, but it's rather high on the backlog.