-
-
Notifications
You must be signed in to change notification settings - Fork 859
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
Check SoftDeletes on HasOne or BelongsTo relations #1628
Conversation
* @param string $type | ||
*/ | ||
protected function performJoin($table, $foreign, $other, $type = 'left') | ||
protected function performJoin($table, $foreign, $other, $deletedAt = false, $type = 'left') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please put deletedAt
as the last argument to prevent possible breaking change.
protected function checkSoftDeletesOnModel($model) | ||
{ | ||
if (in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($model))) { | ||
return $model->getDeletedAtColumn(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this return the fully qualified column name? Can't check the codes yet but PR looks good. Thanks!
Sorry for late reply. The PR looks good. Will try to test this on actual project next week and possibly add a test case for this scenario. |
Released on v8.4.2, thanks a lot! 🥂 |
Right now, if the related table uses SoftDeletes, it is not handled via the
performJoin
method.