예제 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTree()
 {
     return $this->hasOne(Tree::className(), ['id' => 'tree_id']);
 }
예제 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getTrees()
 {
     return $this->hasMany(Tree::className(), ['tree_type_id' => 'id']);
 }