Skip to content

Commit

Permalink
use fully qualified column name
Browse files Browse the repository at this point in the history
  • Loading branch information
ddzobov committed Mar 15, 2020
1 parent f564198 commit 2a6c296
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Relations/BelongsToManySoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function deletedAt()
*/
public function getQualifiedDeletedAtColumnName()
{
return $this->getQualifiedColumnName($this->pivotDeletedAt);
return $this->getQualifiedColumnName($this->deletedAt());
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Relations/Concerns/InteractsWithPivotTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ protected function getCurrentlyAttachedPivots()
protected function newPivotQueryWithoutTrashed()
{
return $this->newPivotQuery()->when($this->withSoftDeletes, function (Builder $query) {
$query->whereNull($this->deletedAt());
$query->whereNull($this->getQualifiedDeletedAtColumnName());
});
}
}

0 comments on commit 2a6c296

Please sign in to comment.