-
Notifications
You must be signed in to change notification settings - Fork 320
When deleting a translated model where child have a FK Restrict, model is not deleted but translations are deleted #7
Comments
Unfortunately I didn't find the time yet to deal with this. Is it possible for you to create a pull request with the failing test? I agree that translations should be deleted by the database. |
Thanks for the pull request :) I think I will update the repository tag to 3, because with the new commit the package is not 100% backwards compatible with the version 2. It would be nice to hear your opinion though. |
I think it´s a good idea. Samuel
|
Glad to hear that. Alright I will apply the v3 tag to the repository. Thanks for the help. |
According to the schema below, if I delete a menu, the DB stop the deletion because of the FK in menulinks but menu_translations are deleted. It's because laravel-translatable delete translations first.
Why not let the DB delete translations by setting
->onDelete('cascade');
on the FK ?Here is the schema :
The text was updated successfully, but these errors were encountered: