alickbass / CodableFirebase

Use Codable with Firebase
MIT License
692 stars 91 forks source link

Encode and decode documents for subcollection? #73

Open siyao1030 opened 5 years ago

siyao1030 commented 5 years ago

I cannot find any documented way to encode/decode array of objects in a subcollection of a document. Please help point it out if there is.

For example, I have object Group with an array "members" containing a list of object User. How can I encode/decode "members" as a subcollection instead of a map (which is what CodableFirebase automatically encodes to).

Thank you!