flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

Collection Group query isn't returning any data

Open SirusCodes opened this issue 6 years ago • 5 comments

I have set composite index and rules in console but still I'm unable to get any data. Below is snippet of my service for query

_db
        .collectionGroup("entries")
        .where("instructors", arrayContains: _id.getUser.mailID)
        .where("branch", isEqualTo: _id.getBranch.name)
        .where("date", isEqualTo: date)
        .snapshots(); 

SirusCodes avatar Apr 09 '20 07:04 SirusCodes

Hi @SirusCodes This platform is not meant for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this, you may also get some help if you post it on Stack Overflow. Closing, as this isn't an issue with Flutter itself, if you disagree please write in the comments and I will reopen it Thank you

TahaTesser avatar Apr 09 '20 08:04 TahaTesser

Same issue here, not streaming collection when using arrayContains. Hello @TahaTesser kindly try it yourself so that you consider this an issue.

pubspec.yaml: cupertino_icons: ^0.1.2 animated_text_kit: ^1.3.0 firebase_core: ^0.4.1+5 firebase_auth: ^0.15.4 cloud_firestore: ^0.13.4+1 cached_network_image: ^2.0.0 fluttertoast: ^3.1.3 shared_preferences: ^0.5.6+1 google_sign_in: ^4.1.1 firebase_messaging: ^5.1.0 firebase_analytics:

flutter version: 1.12.13+hotfix.7

flutter doctor: [✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Linux, locale en_US.utf8) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Android Studio (version 3.5) [✓] Connected device (1 available)

kingdg25 avatar Apr 17 '20 07:04 kingdg25

Same issue here. It seems like collectionGroup queries will not receive results with where clauses.

@TahaTesser

theniceboy avatar May 30 '20 00:05 theniceboy

What issue I was facing that i couldn't get data using arrayContains clause rest other clauses worked fine and arrayContains clause searches the clause in the incoming data so that gave me a issues. I was my mistake!

I'm using 0.13.4+2 version.

I don't know why you all are facing this issue but I would be happy to help you.

SirusCodes avatar May 30 '20 20:05 SirusCodes

Hi @SirusCodes given your last message I feel safe to close this issue, if you disagree please write in the comments and I will reopen it.

Could everyone who still has this problem please file a new issue with the exact description of what happens, logs and the output of flutter doctor -v. All system setups can be slightly different, so it's always better to open new issues and reference related issues. Thank you

TahaTesser avatar Jun 02 '20 14:06 TahaTesser