Skip to content

Commit

Permalink
use qualified column for queries
Browse files Browse the repository at this point in the history
  • Loading branch information
EriBloo committed Feb 8, 2024
1 parent 147e7a8 commit 39bb8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Eloquent/HashableId.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ trait HashableId
public function scopeByHash(Builder $query, string $hash): Builder
{
return $this->shouldHashPersist()
? $query->where($this->getHashColumnName(), $hash)
: $query->where($this->getKeyName(), self::hashToId($hash));
? $query->where($this->qualifyColumn($this->getHashColumnName()), $hash)
: $query->where($this->getQualifiedKeyName(), self::hashToId($hash));
}

/**
Expand Down

0 comments on commit 39bb8e6

Please sign in to comment.