I am using appwrite in react js. I have Array of data. I am trying to create new document in database. For that I am looping through array of data and creating new document. The first document is successfully created but for the next document i get "Document with the requested ID already exists" error. I am not sure why this issue. I am providing unique iD. I tried with storage and it works perfectly. I am using appwrite version 1.3.8
Not sure if this is anything but your database variable is database not databases.
Do you have a unique index on the collection?
my bad, in real code the variable name is right . i was trying to summarize my code to put it here, that time i made typo.
yes i have
It says failed but maybe it sure create... So you can get that error because of the unique index too
I removed all indexes and I still get this error. however i created new collection with only two attribute(with unique index) and it is working. in my old collection i do have data which i manually inserted using appwrited dashboard and later i tried to upload using appwrite api. for now i will try few other things.
Maybe one of the existing documents caused the conflict
Recommended threads
- One to many 2 way, console UI not correc...
Hey, seems I'm facing the exactly same issue with this one: https://github.com/appwrite/appwrite/issues/6016 Since this Github issue stay open for so long, let ...
- Scheduled works locking the entire Maria...
I have a scheduled function and apparently that or something is locking the entire MariaDB database and Appwrite is giving MariaDB errors. This error persists e...
- Need help to create a wrapper which let ...
I’m looking for help setting up Appwrite properly on a VPS so I can build a self-hosting wrapper around it. The goal is to provide a Linux executable that allow...