DEV Community

Discussion on: 𝚒𝚗𝚝𝚎𝚐𝚛𝚒𝚏𝚢 - Firestore referential integrity via triggers

Collapse
 
felixcollins profile image
Felix Collins

Looks useful. Can it do Many to many? How do I delete a stale reference from an array of foreign keys. given:

/parents/
parentId/
mychildren (array of FK childId)

/children/
childId/

if I delete a child, how do I delete from mychildren array?

Or do you think I should use a "joining" document?