Hi,

I have an error with sfDoctrinePager if i use groupBy into my request.

My code:
$this->pager->getQuery()
->select('g.*, COUNT(gp.gallery_id) count')
->from('Gallery g')
->leftJoin('g.GalleryPicture gp')
->groupBy('gp.gallery_id');

Error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'g4.gallery_id'  
in 'group statement'

If i execute the same code but not with Pager, this is OK:
$this->galleries = Doctrine_Query::create()
->select('g.*, COUNT(gp.gallery_id) count')
->from('Gallery g')
->leftJoin('g.GalleryPicture gp')
->groupBy('gp.gallery_id')
->execute();

Why ?

Please help me

Thanks

Bertrand


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to