Open kobazzo opened 5 years ago
Hi! I am sorry, but I don't really understand your question... What kind of id are you talking about?
When i execute the insert in Cloud Firestore with che Club object encoded, firebase add the players items with key 0, 1, 2 etc... example
I want to set the key of the player item with a custom value, for example the UID user of the firebase authentication user, then i can query the clubs for login user with owner.
Thanks for clarifying that! The thing is, if it is an array, the keys can only be integers and they should go in order. Instead of using [MPUser]
try using a dictionary like [String: MPUser]
and this way you will be able to set any key to that dictionary
Thank you very mutch for your suggestion. Than i can do a cloud firestore query to have clubs with particular (current) owner by his id?
Hi. I have an object with some properties. One of this property is an Array of object like:
When i encode this object (Club) for add in cloud Firestore, in Swift 4, i would like to set a custom id every player, in particular i want to use the Firebase User id.
Is it possible to do this?
Thank you.