Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.4
-
Fix Version/s: None
-
Component/s: Query
-
Labels:None
-
Environment:symfony 1.4.12-DEV / Windows XP / Apache 2.0 / MySQL 5.1.37 / PHP 5.3.0
Description
With Doctrine::ATTR_QUOTE_IDENTIFIER enabled, when you launch a query with a complex having clause, Doctrine_Query_Having class does not handle it correctly.
By example, when you track the having clause interpretation:
$query->addHaving( 'SUM( IF( s.id = ? , 1 , 0 ) ) = 0' , 7 );
At some point, Doctrine_Query_Having at line 70 return something like "`s10`.`id = ?`" instead of "`s10`.`id` = ?".
I just fix it using:
return $this->query->parseClause($func);
instead of:
return $this->_parseAliases($func);
Now, the parseAliases function is not used anymore...
See patch attached...
Loops