You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using @Serializable data class and I want it to include its own documentId so I can reference it later from other documents. Something like this:
@Serializable
data class One(
@DocumentId
val id: String,
)
@Serializable
data class Two(
@DocumentId
val id: String,
val oneId: String,
)
...
val one: One = Firebase.firestore
.collection("ones")
.get()
.documents
.first()
.data<One>()
Firebase.firestore
.collection("twos")
.where("oneId", equals = one.id)
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there an equivalent to
@DocumentId
annotation?I am using
@Serializable
data class and I want it to include its own documentId so I can reference it later from other documents. Something like this:How can I achieve it with this library?
Beta Was this translation helpful? Give feedback.
All reactions