Closed emroussel closed 7 years ago
I fixed this specific issue by changing the "On Delete" on the Model -> Brand relation to CASCADE
, so when a brand is deleted, all related models are also deleted.
However, when a user attempts to delete a brand/model that some items are assigned to, a 500 Internal Server Error
will be returned and the brand/model will not be deleted.
When trying to delete a brand that is associated with one or multiple models, the api returns a
500
. The same happens when trying to delete a brand, model or category associated to an item.Instead, it should delete all related entities.