Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outdated Error Message #4253

MrAndrew opened this issue Jan 2, 2021 · 1 comment · Fixed by #4262

Outdated Error Message #4253

MrAndrew opened this issue Jan 2, 2021 · 1 comment · Fixed by #4262


Copy link

MrAndrew commented Jan 2, 2021

[REQUIRED] Describe your environment

  • Operating System version: Windows 10
  • Browser version: Chrome
  • Firebase SDK version: 6.14.10
  • Firebase Product: Firestore

[REQUIRED] Describe the problem/steps to reproduce:

I get an error message when running a query with the not equal comparison combined with an order by on another field:

Invalid query.... You have a where filter with an inequality (<, <=, >, or >=) on field 'myDocField' and so you must also use 'myDocField' as your first argument to Query.orderBy(), but your first orderBy() is on field 'someOtherDocField' instead.

I believe the error message need to be updated to include the "!=" symbol.

#### Relevant Code:

 My query is like this:

myQuery = myReference.where("myDocField", "!=", 0).orderBy("someOtherDocField").get(); //throws error

while this doesn't throw the error:

myQuery = myReference.where("myDocField", "!=", 0).orderBy("myDocField").orderBy("someOtherDocField").get(); //allowed

Copy link

@MrAndrew Thanks for reporting this! I'll have an update for the error message out shortly :)

@firebase firebase locked and limited conversation to collaborators Feb 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging a pull request may close this issue.

3 participants