Hi! Is it possible to set a unique index per user on one field? I could store another field with the user ID and create a unique index over both fields. But this is not so nice because in this case document security is enabled so the user is known anyway.
Sorry I'm not quite sure what you mean. What are you trying to do? Make sure no 2 documents have the same value?
Let's assume there is a collection "fruits". Every logged in user can deposit his favorite fruits. Each name of a fruit must be unique (apple, banana, pineapple). Therefore a unique index. But another user can also have "banana" as favorite fruit and should be able to enter it. Therefore I need a unique index for one column per user.
This should be possible with 1 unique index that has both the user id and fruit attributes
ok thanks
Recommended threads
- Seed db
hello there... is this correct way to seed appwrite
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Type Mismatch in AppwriteException
There is a discrepancy in the TypeScript type definitions for AppwriteException. The response property is defined as a string in the type definitions, but in pr...