/** * @return \yii\db\ActiveQuery */ public function getLocations() { return $this->hasMany(Locations::className(), ['cellar_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getCellarLoc() { return $this->hasOne(Locations::className(), ['cellar_loc_id' => 'cellar_loc_id']); }