angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

Multiple OrderBy does not return results when using AngularFirestore #2135

Closed pain0486 closed 3 years ago

pain0486 commented 4 years ago

Note: I know this is not supported for a Real-Time Database but is should be for Cloud. As shown in the Firebase docs

Version info

Angular: 8.1.2

Firebase: 6.3.1

AngularFire: 5.2.1

Other (e.g. Ionic/Cordova, Node, browser, operating system): OS Windows 10 Browser Chrome Node 11.0

How to reproduce these conditions

Failing test unit, Plunkr, or JSFiddle demonstrating the problem

Stack Blitz example

Steps to set up and reproduce

Chain two orderBy statements IE

this.db
        .collection<Employee>('employees', ref => ref.orderBy('lastName').orderBy('firstName'))
        .snapshotChanges()

Note this works fine when using either of them individually but when combined no results are returned.

Sample data and security rules

Provided in stack blitz example

Debug output

Errors in the JavaScript console None

Expected behavior

Results are returned orderBy lastName then firstName

Actual behavior

No results are returned

hiepxanh commented 4 years ago

this basicly impossible and not support yet official by firebase sir