#1454: SubQuery
-------------------------+--------------------------------------------------
Reporter: usmanqamar | Owner: romanb
Type: defect | Status: new
Priority: major | Milestone: 1.0.3
Component: Record | Version: 1.0
Resolution: | Keywords:
Has_test: 0 | Mystatus: Pending Core Response
Has_patch: 0 |
-------------------------+--------------------------------------------------
Comment (by jwage):
One way to fix this is to change the code in copyAliases() to this:
{{{
public function copyAliases(Doctrine_Query_Abstract $query)
{
$this->_tableAliasMap =& $query->_tableAliasMap;
$this->_queryComponents = $query->_queryComponents;
$this->_tableAliasSeeds = $query->_tableAliasSeeds;
return $this;
}
}}}
The problem is that if the subquery increments one of the aliases then the
main query isn't aware of it and tries to generate the same alias that the
subquery already generated. The above code means the query and subquery
share the same table alias map.
This also fixes #1254
Roman, can you give your opinion on this and reassign the ticket back to
me. Thanks, Jon
--
Ticket URL: <http://trac.doctrine-project.org/ticket/1454#comment:5>
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
-~----------~----~----~----~------~----~------~--~---