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
- dynamic key missing scopes for database ...
Here are the scopes listed, I get permission errors for reading row and document. Appears to be missing since last time i checked. Database 6 Scopes policies....
- Upgrading selfhost version?
It is okay to upgrade version to higher one, of my current version is 1.7.4 to 1.8.1. Is that safe to do cause my clients already have data on that? Also is a...
- Appwrite cloud DB server error 500
Getting this error