Open ben55j opened 1 year ago
Hello ben55j,
I think the solution I'm about to provide is late but it might help others if you've already fixed it.
While using inEquality in query it's compulsry to use orderBy as displayed in the README.md.
firebaseFirestore.collection(FirebaseCollectionConst.users) .where("uid", isNotEqualTo: uid) .orderBy("uid")
Hello,
I get on error when using the "isNotEqualTo" in the querry for comparing 2 strings values. Here is the querry line, Knowing that "ownerUid" is a string field in my groups collection:
query: FirebaseFirestore.instance.collection("groups").where("ownerUid", isNotEqualTo: "abcde12456").orderBy("createdDate"),
Here the error I get from the console:════════ Exception caught by widgets library ═══════════════════════════════════ The following assertion was thrown building ScreenInvitations(dirty, state: _ScreenInvitationsState#d8dc3): The initial orderBy() field "[[FieldPath([createdDate]), false]][0][0]" has to be the same as the where() field parameter "FieldPath([ownerUid])" when an inequality operator is invoked. 'package:cloud_firestore/src/query.dart': query.dart:1 Failed assertion: line 489 pos 13: 'conditionField == orders[0][0]'
I am using : kr_paginate_firestore: ^1.0.1