#1400: DQL strips last character off field name
-----------------------------------+----------------------------------------
Reporter: magnetik | Owner: romanb
Type: defect | Status: new
Priority: major | Milestone: New
Component: Query/Hydration | Version: 1.0
Keywords: query parse | Has_test: 0
Mystatus: Pending Core Response | Has_patch: 0
-----------------------------------+----------------------------------------
Doctrine_Query strips off one character from a field name in my query. See
the following:
{{{
#!php
$designs = Doctrine_Query::create()
->from('ContractDesign d')
->where('d.id in (SELECT d2.id FROM ContractDesign
d2 GROUP BY d2.level HAVING MAX(d2.version)')
->orderBy('d.level asc')
;
}}}
This produces the following SQL:
{{{
#!sql
SELECT c.id AS c__id, c.name AS c__name, c.level AS c__level, c.version AS
c__version FROM contract_designs c WHERE c.id in (SELECT c2.id AS c2__id
FROM contract_designs c2 GROUP BY c2.level HAVING MAX(c2.versio)) ORDER BY
c.level asc
}}}
Notice the missing 'n' from the c2.version column name in the HAVING MAX
part of the query
I've tested this in 0.10, 0.11 and 1.0.0-RC2
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1400>
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
-~----------~----~----~----~------~----~------~--~---