
i am storing a no. of Uids in an array string inside one of my collections. how can i make sure that no ids are repeated in that array i.e all the ids in that array are unique

u cant.. best way is to check inside your code.

or i will suggest making a separate collection 🤔

like there can be two attributes "main_doc_id" and "relation_doc_id"

and then you can create an unique index on those two attributes combined

afterwards u just have to create multiple documents with those attributes and your "relation_doc_id" attribute will take the id one by one from array you talked about

getting me?

If the length of the array isn't too big, you can check manually firsthand. You should know the doc Id though for fast path access.
Recommended threads
- User (role: guests) missing scopes (["te...
I keep getting this error: ```AppwriteException: User (role: guests) missing scopes (["teams.read"]) at new AppwriteException (/usr/local/server/src/functio...
- Queries Length Error.
Hi All, I am having a issues across my app with how i am getting data, and just wanted to check if this was an issues with the new changes on appwrite over the...
- The current user is not authorized to pe...
I'm just getting this error while it was working couple minutes ago, my users have permissions to access and create tables data but on some databases I'm just g...
