flutterfire
flutterfire copied to clipboard
🐛 [cloud_firestore_odm] Queries with multiple orderBy and a startAt throw an assertion error
Repro:
@Collection<Foo>('firestore-example-app/test/private-advanced')
@JsonSerializable()
class Foo {
Foo({
this.firstName,
this.lastName,
});
final String? firstName;
final String? lastName;
}
void main() {
FooCollectionReference().orderByFirstName(startAt: 'John').orderByLastName();
}
This should be valid but fails.
Such issue raises another concern:
void main() {
FooCollectionReference().orderByFirstName().orderByLastName(startAt: 'Smith');
}
It's probable that the startAt here is in fact applied on the firstName instead of lastName