예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCateg()
 {
     return $this->hasOne(ProductCategory::className(), ['id' => 'categ_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductCategories()
 {
     return $this->hasMany(ProductCategory::className(), ['parent_id' => 'id']);
 }