Skip to content

How to delete a polymorphic row when deleting a model? #14411

Discussion options

You must be logged in to vote

If I'm not mistaken, a polymorphic row is a row that can reference different tables?
If that's the case, that is not supported, as we rely on ON DELETE CASCADE to delete the row from the through table, and such a row would not have a foreign key.

You need to delete it manually

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lucassimines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants