From 42ffcb75c75d504abd93688ceef7c4692ee8f3f5 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 16 Sep 2020 10:07:34 +0800 Subject: [PATCH] =?UTF-8?q?update:=E6=9B=B4=E6=96=B0whereLike=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/CatchQuery.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extend/catcher/CatchQuery.php b/extend/catcher/CatchQuery.php index 0a714d2..80321e3 100644 --- a/extend/catcher/CatchQuery.php +++ b/extend/catcher/CatchQuery.php @@ -159,7 +159,11 @@ class CatchQuery extends Query $condition .= '%'; } - return parent::whereLike($this->getAlias() . '.' . $field, $condition, $logic); + if (strpos($field, '.') === false) { + $field = $this->getAlias() . '.' . $field; + } + + return parent::whereLike($field, $condition, $logic); } /**