so i have this getAvgRatings method on my model "Animes"
public function getAvgRatings(){
return $this->modelsManager
->createBuilder()
->addFrom("\App\Models\Ratings")
->columns(['\App\Models\Animes.id','\App\Models\Animes.name','count(Ratings.id) as TotalRatings','format(Avg(Ratings.value))'])
->where('Ratings.anime_id = :animeid: And Ratings.anime_id is not Null', ['animeid'=> $this->id ])
->groupBy('Ratings.anime_id')->getQuery()->execute();
}
but whenever i call it i get this error
Uncaught Phalcon\Mvc\Model\Exception: Unknown model or alias '\App\Models\Animes'