示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUoms()
 {
     return $this->hasMany(Uom::className(), ['id' => 'uom_id'])->viaTable('{{%product_uom}}', ['product_id' => 'id']);
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUom()
 {
     return $this->hasOne(Uom::className(), ['id' => 'uom_id']);
 }