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