Say I have this minimal database stored in Cloud Firestore. How could I retrieve the names of subCollection1 and subCollection2?  rootCollection {     aDocument: {         someField: { value: 1 },         anotherField: { value: 2 }         subColle...
I tried to read sorted data from Cloud Firestore using OrderBy. And Firestore returned data as Following Order:  AAA BBB aaa bbb  Now, what I want is something like following:  AAA aaa BBB bbb  I want this result only using OrderBy not by manual So...
I have fetch some data from firestore but in my query I want to add a conditional where clause. I am using async-await for api and not sure how to add a consitional where clause.  Here is my function  export async function getMyPosts (type) {   awa...
How can I listen to a specific field change with firestore js sdk ?  In the documentation, they only seem to show how to listen for the whole document, if any of the "SF" field changes, it will trigger the callback.  db.collection("cities...
I am trying to filter data with multiple where() methods using the array-contains operator, however I am having the following error:  An error occured: Error: 3 INVALID_ARGUMENT:  A maximum of 1 'ARRAY_CONTAINS' filter is allowed.   Basically...
Using get() in Firestore rules on a newly created document causes the return value to be false. If you wait a few seconds and hit a security rule that calls get() on that same new document, get() will then return the expected value. Am I missing some...
I have a collection called 'categories' containing a single document with ID: 5gF5FqRPvdroRF8isOwd.  I have another collection called 'tickets'. Each ticket has a reference field which assigns the ticket to a particular category.  The...
When I try to initialize Firebase Cloud Firestore, I ran into the following error:      Uncaught TypeError: WEBPACK_IMPORTED_MODULE_0_firebase.firestore is not a function   I installed firebase with npm install firebase --save previously.  import * a...
Thanks to Frank over at Firebase for helping me with this code. I just had this one issue with pushing the document id under Friends collection. I am not sure what is the best way to push const friendId and const accepted to friendsList array in the...
This question already has an answer here:...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.