#1483: Cannot perform sub-queries that relate to the query
------------------------------+---------------------------------------------
  Reporter:  colnector        |       Owner:  romanb               
      Type:  defect           |      Status:  new                  
  Priority:  major            |   Milestone:  1.0.3                
 Component:  Query/Hydration  |     Version:  1.0.2                
Resolution:                   |    Keywords:                       
  Has_test:  0                |    Mystatus:  Pending Core Response
 Has_patch:  0                |  
------------------------------+---------------------------------------------
Comment (by colnector):

 Bug still exists (I am using 1.1 branch svn and have it updated)

 This part:
 {{{
 ->leftJoin("$table.Translation t_$table WITH t_$table.lang = (SELECT
 MAX(t2_$table.lang) FROM t2_$table WHERE (t2_$table.lang='$language' OR
 t2_$table.lang='0') AND t2_$table.id=t_$table.id) INDEXBY t_$table.lang")
 }}}

 Still creates the invalid query
 {{{
 Doctrine_Connection->execute('SELECT p.id AS p__id, p.original AS
 p__original, p.context AS p__context, p2.id AS p2__id, p2.lang AS
 p2__lang, p2.name AS p2__name FROM phrase p LEFT JOIN phrase_translation
 p2 ON p.id = p2.id AND p2.lang = (SELECT MAX(t2_p.lang) FROM t2_p WHERE
 (t2_p.lang='45' OR t2_p.lang='0')', array())
 }}}

 Note that no alias was given to t2_p, though t_p did get an alias (p2).

-- 
Ticket URL: <http://trac.doctrine-project.org/ticket/1483#comment:4>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to