I am getting a + symbol inserted instead of a space #175
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi Alan That has changed while correction of #24 already in September 2019 still before version 1.0 was published. On the other hand, I can confirm that the deprecated version of The firestore spec would allow a space (https://firebase.google.com/docs/firestore/quotas#collections_documents_and_fields), but from my point of view a space in an ID is not a good design. How you can you easily distinguish between one, two or more spaces? If you need the space in IDs for compatibility reasons, remove the entry I could offer this as an option, but the interface doesn't get any easier with such a change and as I said, a good design prevents spaces in IDs. Christoph |
Beta Was this translation helpful? Give feedback.
-
Hi Christoph, I understand exactly what you are saying about spaces not being a good idea and will change my code to reflect your advice. However, I use a date time for a document name which also puts a + in the space. Do you have a suggestion on how to deal with this? I do remember reading something about dates in document names but cant remember. Thank you again |
Beta Was this translation helpful? Give feedback.
-
I also have a project where I use a timestamp aso document ID to sort the documents by creation time. However, I use I have now corrected that paths are also encoded correctly in the deprecated method |
Beta Was this translation helpful? Give feedback.
Hi Alan
That has changed while correction of #24 already in September 2019 still before version 1.0 was published. On the other hand, I can confirm that the deprecated version of
TFirestoreDatabase.InsertOrUpdateDocument
did not encode the path correctly when specifying the path, which I now consider a bug. Theclass function TFirestoreDocument.GetDocFullPath
should encode the document path identical withTFirebaseHelpers.EncodeResourceParams
.The firestore spec would allow a space (https://firebase.google.com/docs/firestore/quotas#collections_documents_and_fields), but from my point of view a space in an ID is not a good design. How you can you easily distinguish between one, two or more…