i have two colections. Tags and Posts which post has tages attribute referenced with tags table and has tow way one to one relationship.
i get Document cannot be deleted because it is referenced by another document
error.
by the way i have updated the On deleting a document from restrict to cascade.
what am i doing wrong can anybody help me please?
TL;DR
Error: When trying to delete a document, receiving an error message stating that the document cannot be deleted because it is referenced by another document.
Solution: The issue may be due to the relationship between the Tags and Posts collections. Check if the relationship is set correctly, and ensure that the on-deleting behavior is set to cascade instead of restrict. This will allow the deletion of the document even if it is referenced by another document.