From 39bb8e6918cdf0335421d2b75a454a24d390be71 Mon Sep 17 00:00:00 2001 From: EriBloo <19932449+EriBloo@users.noreply.github.com> Date: Thu, 8 Feb 2024 13:23:41 +0000 Subject: [PATCH] use qualified column for queries --- src/Eloquent/HashableId.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); } /**