We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Query builder - groupBy undefined

Hey guys,

seems like there might be a bug with the query builder.

$sources = Sources::query() 
            ->groupBy('website')    
            ->execute();

Returns:

Fatal error: Call to undefined method Phalcon\Mvc\Model\Criteria::groupBy() in (...)

All other builder functions work fine.

$sources = Sources::find(array('group' => 'website'));

Also works fine. Phalcon version 1.2.3.



98.9k

Currently, there is no option to set a group-by clause using a method