Does that column exist on the GalleryPicture model/table?

Can you show the SQL it executes and your model/schema definitions?

- Jon

On Fri, Sep 26, 2008 at 8:15 AM, Bertrand Zuchuat
<[EMAIL PROTECTED]>wrote:

>
> 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
>
>
> >
>


-- 
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com

--~--~---------~--~----~------------~-------~--~----~
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