-
-
Couldn't load subscription status.
- Fork 180
-
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:
@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)
...
How can I achieve it with this library?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment