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