#1661: Subquery as objects
-----------------------------------+----------------------------------------
Reporter: guilhermeblanco | Owner: jwage
Type: defect | Status: new
Priority: minor | Milestone: Unknown
Component: Attributes | Version: 2.0-DEV
Keywords: | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
We should find a way to support this syntax for 2.0:
{{{
select
s.id_site, max(nb) as nb
from
t_sites s
left join
t_elements e on e.site_id=s.id_site
left join (
select
s.id_site, s.nomsite, count(e.id_element) as nb
from
t_sites s
left join
t_elements e on e.site_id=s.id_site
where
id_site=s.id_site
group by
id_site, nomsite
) AS foo ON foo.id_site=e.site_id
where
e.categorie_id=5
group by s.id_site ;
}}}
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1661>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---