Consider I have a node having Label L1
in Neo4j database. I need to put a constraint on all nodes having label L1
such that there shall be no outgoing edge from these nodes. So whenever user tries to add an outgoing edge from these nodes, a constraint violation occurs. Is it possible to add user defined constraints on nodes and relationships?
If yes, how can I put such constraint(s) on nodes/relationships using Neo4j Java API's?