Let’s assume that you have categories and articles, and you want to delete the category with all its articles.
Inside the beforeDelete lifecycle of Category, you should get all the relations IDs for all the articles, then you can delete them.
Let’s assume that you have categories and articles, and you want to delete the category with all its articles.
Inside the beforeDelete lifecycle of Category, you should get all the relations IDs for all the articles, then you can delete them.