How can I add or remove an entity from a hasMany relationship?
From and endpoint and from server-side
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.