]> gitweb.erp-flowers.ru Git - yii-erp24/.git/commitdiff
fix
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 16 May 2024 10:16:01 +0000 (13:16 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 16 May 2024 10:16:01 +0000 (13:16 +0300)
erp24/records/Sales.php

index b30f3bf07c50a7a9cce1f481342c97485aed1425..5e7b5a6e06b276f79024f1957c1cc8d9c805c2ad 100755 (executable)
@@ -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