Moving builder to Model

Hi All,

I'm using $this->modelsManager->createBuilder()->from ... in controller as it is described in doc, however i wanted to builder functionality directly in model method. Can this be done?

Cheers Zenek

edited Apr '14
$query = new Phalcon\Mvc\Model\Query\Builder();
$results = $query->from('Robots')
   ->join('RobotsParts')
   ->limit(20)
   ->orderBy('Robots.name')
   ->getQuery()
   ->execute();