示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getParent()
 {
     return $this->hasOne(BlogComment::className(), ['id' => 'parent_id']);
 }
示例#2
0
 public function getComments()
 {
     return $this->hasMany(BlogComment::className(), ['post_id' => 'id']);
 }