Skip to content
Back

Sub-Collection Documents not deleting

  • 0
  • Databases
Chedbeast
17 Feb, 2025, 20:16

I have a collection that contains multiple documents in a one to many relationship.

When I delete the main document even with the cascade deletion rule on the document doesn't delete.

The sub collection documents remain there.

TL;DR
Issue: Sub-collection documents are not being deleted when the main document is deleted despite having the cascade deletion rule activated. Solution: The cascade deletion rule needs to be applied at the database level for sub-collection documents to be deleted automatically when the main document is deleted in a one-to-many relationship.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more