diff --git a/src/Eloquent/HashableId.php b/src/Eloquent/HashableId.php index a616882..094eda8 100644 --- a/src/Eloquent/HashableId.php +++ b/src/Eloquent/HashableId.php @@ -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)); } /**