示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProducts()
 {
     return $this->hasMany(Product::className(), ['group_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProducts()
 {
     return $this->hasMany(Product::className(), ['id' => 'product_id'])->viaTable('{{%price}}', ['price_category_id' => 'id']);
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProducts()
 {
     return $this->hasMany(Product::className(), ['id' => 'product_id'])->viaTable('{{%product_supplier}}', ['supplier_id' => 'id']);
 }
示例#4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProduct()
 {
     return $this->hasOne(Product::className(), ['id' => 'product_id']);
 }
示例#5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProducts()
 {
     return $this->hasMany(Product::className(), ['id' => 'product_id'])->viaTable('{{%product_stock}}', ['warehouse_id' => 'id']);
 }