Skip to content
#

firebase-firestore

Here are 899 public repositories matching this topic...

jaynarw
jaynarw commented Jul 30, 2021

Error:

An orderBy function cannot be called more than once in the same query expression

Code:

Comments
  .orderByDescending("pinned")
  .orderByDescending("timestamp")
  .limit(n)
  .find()

Firestore allows ordering using multiple fields in the same query.
Firebase Docs:

You can also order by multiple fields. For example, if you wanted to order by state, and within

Fulbert
Fulbert commented Mar 21, 2020

Hello,

Thanks for this awesome tool!

I have a guarded property on my store, selected, which is used only by the UI, and I don't want to sync on Firestore.
If the guards works well, the document is still synced everytime I change the selected value, because of the updated_at and updated_by value.
Of course, I can add the two properties to the guards too, and it works, but I actually

Improve this page

Add a description, image, and links to the firebase-firestore topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the firebase-firestore topic, visit your repo's landing page and select "manage topics."

Learn more