GitLiveApp / firebase-kotlin-sdk

A Kotlin-first SDK for Firebase
https://gitliveapp.github.io/firebase-kotlin-sdk/
Apache License 2.0
1.07k stars 152 forks source link

Add @DocumentId annotation to firestore for Android and iOS #445

Open mr-kew opened 8 months ago

mr-kew commented 8 months ago
Library Class Member Platforms
firestore annotations DocumentId Android, iOS

Add a way to get documentId as a property inside @Serializable class.

It is done using annotation in native kotlin library and using property wrapper in native swift library.

adityatri commented 5 months ago

Would like to see this as well. Currently I'm not able to use @DocumentId annotation for Android and iOS.

zvona031 commented 3 months ago

Any work on this?

mr-kew commented 3 months ago

@zvona031 Not from my side, I just did a workaround in my code.

I used @Transient property, that is manually set when deserializing the data.