Query to check if Document ID exists #171
-
Hi, Hope you had a great Christmas. I want to check if a certain document exists. My Query is: Query := TStructuredQuery.CreateForCollection('Practitioners') Result := (DocsRecturned.Count =1); But I get an error: Project Denneroll.apk raised exception class EFirebaseResponse with message 'Invalid property path "Document ID". Unquoted property paths must match regex ([a-zA-Z_][a-zA-Z_0-9]*), and quoted property paths must match regex ( I know I can save the Document ID in the Document and query that. Which works. But the query builder in Firebase allows a query on Document ID so there must be a way. As always appreciate your advice. Happy New Year Alan |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
Hi Alain |
Beta Was this translation helpful? Give feedback.
-
Can you shortly check, if the following approach is working? Change the line 1413 of Firestore.pas:
to
|
Beta Was this translation helpful? Give feedback.
-
And this?
|
Beta Was this translation helpful? Give feedback.
-
Thank you Alain for the feedback. I wish you much success with this library! |
Beta Was this translation helpful? Give feedback.
Are you searching a distinct document defined by its path and document ID?
Why not take the simple approach via
TFirestoreDatabase.Get(['Practitioners', APractitionerID]
?