I use the Cloud Firestore database and have linked some entries of a collection by reference.
Now I have the problem, if I delete the reference document, the reference is still there, but the referenced document is not anymore.
What is the plan here, is this a wrong approach for the reference?
Article {
name: string;
price: number;
}
OrderEntry {
name: string;
article: Reference;
}
If I now delete an article, the reference is still present on the OrderEntry, but the article no longer exists.
When deleting an item, can I check if it is referenced in another entity?