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