Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-27-2020 04:11 PM
@andrew.bowman has a great example when such a dependent entity (a report card node) should always be created with a relationship to its parent (a student node). But you can later delete its relationship, and leave a report unrelated to anyone.
Relational databases emulate dependent entities with PKs including the PK of their parent. And you can make sure, with CASCADE DELETE/UPDATE, no child will remain without its parent.
I'm only curious if there is anything in Neo4j to prevent deleting the last relationship to such a node emulating a dependent entity.
Solved! Go to Solution.
05-27-2020 04:15 PM
There's no native functionality for such constraints at the present time.
You may need to create your own triggers for such a thing, or do occasional sweep queries for child nodes lacking the expected relationship to the parent, then delete.
05-27-2020 04:15 PM
There's no native functionality for such constraints at the present time.
You may need to create your own triggers for such a thing, or do occasional sweep queries for child nodes lacking the expected relationship to the parent, then delete.
05-27-2020 04:21 PM
But that's exactly what I was looking for!
Thanks,
-C
PS: I could have never imagine I'll find triggers implemented in APOC, through functions Looks great!
All the sessions of the conference are now available online