flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🐛 [cloud_firestore_odm] Queries with multiple orderBy and a startAt throw an assertion error

Open rrousselGit opened this issue 2 years ago • 0 comments

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

rrousselGit avatar Jul 08 '22 15:07 rrousselGit