You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to firebase store, i'm don't really understand why compound query with orderby, and orderby has to be on the same property. And i take a look at source code, not sure if it's here thrown the exception.
if (_isInequality(operator)) {
if (hasInequality ==null) {
hasInequality = field;
} else {
assert(
hasInequality == field,
'All where filters with an inequality (<, <=, >, or >=) must be '"on the same field. But you have inequality filters on '$hasInequality' and '$field'.",
);
}
}
And the sample query is
Query query =FirebaseFirestore.instance
.collection('media')
.where('type', isNotEqualTo:'file')
.orderBy('type', descending:true) // if this line don't add it will throw error
.orderBy('timestamp', descending:true)
.limit(50);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to firebase store, i'm don't really understand why compound query with orderby, and orderby has to be on the same property. And i take a look at source code, not sure if it's here thrown the exception.
And the sample query is
Beta Was this translation helpful? Give feedback.
All reactions