Example #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductComments()
 {
     return $this->hasMany(ProductComment::className(), ['user_id' => 'id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getProductComment()
 {
     return $this->hasOne(ProductComment::className(), ['id' => 'product_comment_id', 'user_id' => 'product_comment_user_id', 'product_id' => 'product_comment_product_id']);
 }