You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created this global converter, the fromFirestore gets called, but not the toFirestore.
I see test 2 in the console, but never test 1, and the data in my firestore does not have the field created_at.
Both toFirestore and fromFirestore should be called.
Actual behavior
Only the fromFirestore is called.
Additional information
I want to automatically add a created_at field so that I can sort by date when fetching.
Important: Unlike "push IDs" in the Firebase Realtime Database, Cloud Firestore auto-generated IDs do not provide any automatic ordering. If you want to be able to order your documents by creation date, you should store a timestamp as a field in the documents.
Ref: https://firebase.google.com/docs/firestore/manage-data/add-data?hl=fr
The text was updated successfully, but these errors were encountered:
Reproduction
.
Steps to reproduce the bug
I created this global converter, the fromFirestore gets called, but not the toFirestore.
I see
test 2
in the console, but nevertest 1
, and the data in my firestore does not have the fieldcreated_at
.Expected behavior
Both toFirestore and fromFirestore should be called.
Actual behavior
Only the fromFirestore is called.
Additional information
I want to automatically add a
created_at
field so that I can sort by date when fetching.The text was updated successfully, but these errors were encountered: