From f2a7fd7c9c67f2f5a669a5ca78b8ff64c6b6f34a Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Thu, 16 May 2024 13:16:01 +0300 Subject: [PATCH] fix --- erp24/records/Sales.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erp24/records/Sales.php b/erp24/records/Sales.php index b30f3bf..5e7b5a6 100755 --- a/erp24/records/Sales.php +++ b/erp24/records/Sales.php @@ -4,6 +4,7 @@ namespace yii_app\records; use Yii; use yii\db\ActiveQueryInterface; +use yii\db\Expression; /** * This is the model class for table "sales". @@ -135,6 +136,6 @@ class Sales extends \yii\db\ActiveRecord } public function getUsers() { - return $this->hasOne(Users::class, ['phone::varchar(20)' => 'phone::varchar(20)']); + return $this->hasOne(Users::class, [new Expression('phone::varchar(20)') => new Expression('phone::varchar(20)')]); } } \ No newline at end of file -- 2.39.5