/** * @return \yii\db\ActiveQuery */ public function getAttr() { return $this->hasOne(Attribute::className(), ['attr_id' => 'attr_id']); }