You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use SQL trigger to implement destroy dependent. ex:
CREATETRIGGERarticle_comment_association_dependent_destroy
AFTER DELETEON articles
FOR EACH ROW BEGINDELETEFROM comments WHERE private_id = (
SELECT private_id FROM article_comment_associations
WHERE article_id =OLD.private_id;
)
END;
Use SQL trigger to implement destroy dependent. ex:
Article and comment models are like this:
The text was updated successfully, but these errors were encountered: