You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you think that detach() method should detach all related models OR only those are attached?
I mean if call something like this: Post::find(495)->tags()->detach(); twice deleted_at column will be updated 2 times.
Can we leave records untouched in pivot table when they are already deleted (deleted_at column != null)?
The text was updated successfully, but these errors were encountered:
Actually my problem can be solved by using Post::find(495)->tags()->sync([]);
This way deleted_at column will not be updated if it's not empty.
But still do you think that detach() method should respect already deleted records and keep them as is?
Do you think that
detach()
method should detach all related models OR only those are attached?I mean if call something like this:
Post::find(495)->tags()->detach();
twicedeleted_at
column will be updated 2 times.Can we leave records untouched in pivot table when they are already deleted (
deleted_at
column != null)?The text was updated successfully, but these errors were encountered: