Set and Get Nested data #155
-
Hi I need to set and Get some data that is nested a few levels down. The collection is: /Practitioners/0eB9jg1zBijcXoYgoKmP/Users/hxGhwHLftPB70FagWpP6/Lumbar Denerroll I need to create documents at this level and the retrieve all the documents. Reading the Docs and using the examples.. I can read the collection using: I can Create an empty document with: But I'm struggling to Set (create) a new document in this collection. I'm trying: But I get an error: Insert or update document for Practitioners,0eB9jg1zBijcXoYgoKmP,Users,hxGhwHLftPB70FagWpP6,Lumbar Denerroll failed: Document name "projects/XXXXXXX/databases/(default)/documents/Practitioners/0eB9jg1zBijcXoYgoKmP/Users/hxGhwHLftPB70FagWpP6/Lumbar Denerroll" lacks "/" at index 136. I have tried variations. Can someone please tell what I'm missing. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Do you forgot the level 'User' in your InsertOrUpdateDocument method call? Database.InsertOrUpdateDocument(['Practitioners', '0eB9jg1zBijcXoYgoKmP','User','hxGhwHLftPB70FagWpP6','Lumbar Denerroll' ],Doc, nil, OnFirestoreInsertOrUpdate, OnFirestoreError) In the reported error message the path seems to be correct. Can you test the following actions:
Please inform us which actions solved your problem. |
Beta Was this translation helpful? Give feedback.
-
Many thanks for your response. In the end I went with the "Create Document" rather than "InsertorUpdate" Thanks again Alan |
Beta Was this translation helpful? Give feedback.
Do you forgot the level 'User' in your InsertOrUpdateDocument method call?
Database.InsertOrUpdateDocument(['Practitioners', '0eB9jg1zBijcXoYgoKmP','User','hxGhwHLftPB70FagWpP6','Lumbar Denerroll' ],Doc, nil, OnFirestoreInsertOrUpdate, OnFirestoreError)
In the reported error message the path seems to be correct.
Can you test the following actions:
projects/XXXXXXX/databases/(default)/documents/Practitioners/0eB9jg1zBijcXoYgoKmP/Users/hxGhwHLftPB70FagWp…