Create document with relations, if error can result in orphan relation document
- 1
- Databases
- Tools
Hey, little question, about foreign relationship. How do you deals with orphan when a create document failed ?
I try to upload a lot of data to appwrite cloud, so i loop over my parsed json, and sometimes i have issue (like a new attribute that i don' know or a something else) that leads to an error of the creating document, but foreign key can have be created. And after that i have very hard to find orphans in my collection
Thanks 🙂
i use sdk node-appwrite
You might have to manually iterate over the collection to find them because querying is not supported 😕
Yes =\ I have change how to insert my data and don’t use relationship
I insert a foreign key in the related documents
So i can handle orphan in the script before insert and everything is working
If your issue has been solved, you can mark this post as closed by adding "[SOLVED]" to the beginning of the title
Recommended threads
- 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
- appwrite indexes not working (?
i have this index: ``` "indexes": [ { "key": "single-user-per-event", "type": "unique", ...