f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

Searching arrays using array_contains Firestore functions #5

Closed jehans closed 5 years ago

jehans commented 5 years ago

Hello! Great plugin which does 99% of everything I need. I have a question/issue, and was hoping to get some help with this.

I have a collection called "Projects", that contains an array with strings of user_id's that dictate who owns that document. I need to be able to search these arrays like the function "array_contains" that is explained on the website https://firebase.google.com/docs/firestore/query-data/queries.

Is this possible in the current version? Searching using the .WhereEqualsTo function using an array works, but only on a 100% match, and not for searching for a given value within the array.

jehans commented 5 years ago

This seems to be implemented in version 2.0 of this plugin. Thank you very much F-miyu!