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
- Custom Domain Verification Failed
Hi! I woke up to my app not working because of this custom domain verification failed error. I have not moved any DNS configuration since I set it up 3 years ag...
- Auto Updating Backend & Auth via Appwrit...
<@870607367597850624> Hey everyone π I wanted to ask to ask for a friend, heβs asking if Appwrite be used in a similar way to Supabase when integrated with AI ...
- Is Database Operators available in Cloud...
Is it possible to do the above?