Yes thank you I managed to do it.
Works like a charm.
Another question for my example.
Can the foreignKey be the id of the target Firestore doc? What is the exact field name?
And: is it safe to use the same document id in multiple collections?
For example I have a users collection and I want to add "liked" users to a doc as a subcollection. I would use the same id of the user, but is it safe at a Firestore model level?
Thank you
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello very nice!
What about if target is a subcollection of a document?
Like:
users:[
user: {
userID
}
]
comments: [
comment: {
liked: [
userID
]
}
]
Thats a great question @camillo777 .
As of v2.2.0, you can now replicate into and delete references from subcollections by specifying
isCollectionGroup: true
in the target collection:See README for full details.
Yes thank you I managed to do it.
Works like a charm.
Another question for my example.
Can the foreignKey be the id of the target Firestore doc? What is the exact field name?
And: is it safe to use the same document id in multiple collections?
For example I have a users collection and I want to add "liked" users to a doc as a subcollection. I would use the same id of the user, but is it safe at a Firestore model level?
Thank you