refi-app
refi-app copied to clipboard
How to query a child variable under the object? throws error
Hi, Below is my doc in firestore and i am trying to query using filter "audit.CreatedProcess" with String value of "oneTimeLoad" but it throws errors stating. how to sort it? is there any document that explains how to play with this tool for query?
{
"audit": {
"createdAt": "__Timestamp__2022-06-18T01:47:41.559Z",
"createdBy": "author",
"createdProcess": "oneTimeLoad"
},
"homeAddress": {
"city": "To be removed"
},
"personId": "a5287078-eea8-11ec-af99-47bba4a2ad21",
"residentialAddress": {}
}
There are few other questions:
- How can we delete multiple docs based on collection? like SQL, delete query.
- How can update multiple docs based on query result? like SQL, update query.
Hi, Below is my doc in firestore and i am trying to query using filter "audit.CreatedProcess" with String value of "oneTimeLoad" but it throws errors stating. how to sort it? is there any document that explains how to play with this tool for query?
As the error said, you can only filter and sort by just one field audit.CreatedProcess
. This is limitation from Firestore, so you can not sort by name and filter by audit or vice versa
How can we delete multiple docs based on collection? like SQL, delete query.
You can only delete one by one for now (Right click and hit delete
How can update multiple docs based on query results? like SQL, update query.
No for now, it's in the roadmap