Hello, I have a parent table called asset
and a child table called user
. user
table has a 1-1 relationship with asset
as 1 user can only use 1 asset. And 1 asset can only belong to 1 user.
The thing is, at the point of asset creation, it is possible that there is no user yet until after some times, which means user
could potentially be empty for a long time.
Now, I want to set up a relationship such that if I delete an asset
, it will delete the user
too. I have set up the relationship as Cascade. But, I noticed that when I delete the user
, it also deletes the asset
, which I don't want.
How do I set it such that:
- If I delete
asset
, it deletes its associateduser
- If I delete
user
, nothing happens toasset
Recommended threads
- Attributes Confusion
```import 'package:appwrite/models.dart'; class OrdersModel { String id, email, name, phone, status, user_id, address; int discount, total, created_at; L...
- How to Avoid Double Requests in function...
I'm currently using Appwrite's `functions.createExecution` in my project. I want to avoid double requests when multiple actions (like searching or pagination) a...
- Edit ID of an existing collection
Hi there. Is it possible to edit an ID of an existing collection? Right now it looks impossible from AppWrite cloud at least.