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
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- 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...