Back

`notContains` Query not available

  • 0
  • Databases
  • REST API
  • Cloud
Sean
13 Oct, 2024, 16:18

I have a collection with documents that have a userIds attribute containing an array of string values. I want to list these documents by excluding the ones that contain a certain userId in this array.

I need a notContains which seems to not exist. Is there a workaround for this?

TL;DR
Developers seek to filter documents by excluding those containing a specific userId in an array attribute. They are looking for a `notContains` query, which is not available. A workaround for this is to use the `$not` operator in combination with the `$in` operator to achieve the desired exclusion.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more