/** * @return \yii\db\ActiveQuery */ public function getParts() { return $this->hasMany(Part::className(), ['category_id' => 'id']); }