[DC-188] Pager breaks when HAVING clause references existing table column Created: 04/Nov/09 Updated: 20/Jul/10 |
|
| Status: | Open |
| Project: | Doctrine 1 |
| Component/s: | Pager |
| Affects Version/s: | 1.1.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Benedict Bacayon | Assignee: | Guilherme Blanco |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Local: Windows/Cygwin/XAMPP |
||
| Description |
|
Pager breaks when HAVING clause references any existing table column. Query used: $q = Doctrine_Query::create() Execution of query by itself works fine (eg via execute(), fetch...) When putting this query in a Doctrine_Pager, error outputs: $pager = new Doctrine_Pager( $pager->execute(); Error Received: |
| Comments |
| Comment by ryan [ 20/Jul/10 ] |
|
a quick fix for this is to enclose the field in parentheses when selecting it, then use an alias to reference it inside the having clause. eg $q = Doctrine_Query::create() |