Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem in beforeDelete #29

Open
samirreza opened this issue Jul 23, 2018 · 0 comments
Open

problem in beforeDelete #29

samirreza opened this issue Jul 23, 2018 · 0 comments

Comments

@samirreza
Copy link

samirreza commented Jul 23, 2018

its better to check whether the owner model has error or not before reducing frequency and deleting all relations. because if some behaviors wants to attach error on owner and they registered before TaggableBehavior and reject deleting for some reasons, when deleting is perform the owner model stay live but all relations gone.
something like this in beforeDelete() :
if ($this->owner->hasErrors()) { return; }
we can also think about doing this afterDelete event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant