Skip to content
Back

Relationships on delete question

  • 1
  • Databases
  • Flutter
  • Cloud
rlee128
26 Aug, 2025, 20:17

When selecting what to do on delete. How do we know which direction the delete will occur? For example: Say we have a notes table and a user table. On the notes table we add a relationship to the user table as a one way relationship and the relation is many to one. Does that mean if the notes row is deleted it will delete the user row or does it mean if the user row is deleted it will delete all rows linked to the user row?

TL;DR
In a one-way relationship where the relation is many to one (from notes to user), deleting a notes row will not delete the user row. Deleting the user row will delete all rows linked to that user.
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