Additional information which could be helpful if relevant to your issue:
Code example
When #destroy is called on an Neo4j::ActiveNode model, the default behavior is such that it effectively does a DETACH DELETE.
irb(main):009:0> c.destroy
CYPHER
MATCH (n)
WHERE (ID(n) = {ID_n})
OPTIONAL MATCH (n)-[r]-()
DELETE
n,
r | {:ID_n=>2100}
For some things this is fine, but in other cases where you desire data integrity this is less than desirable.
Feature Request
It would be beneficial if we were able to specify the default behavior for a given model such that you could make it so it doesn't do a detach delete so that the #destroy will throw an exception if there are relationships to the node.
Additional information which could be helpful if relevant to your issue:
Code example
When
#destroy
is called on anNeo4j::ActiveNode
model, the default behavior is such that it effectively does aDETACH DELETE
.For some things this is fine, but in other cases where you desire data integrity this is less than desirable.
Feature Request
It would be beneficial if we were able to specify the default behavior for a given model such that you could make it so it doesn't do a detach delete so that the
#destroy
will throw an exception if there are relationships to the node.