[DDC-2470] Sql Server error in createQuery using ORDER BY and setMaxResults Created: 24/May/13 Updated: 24/May/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | DQL |
| Affects Version/s: | 2.4, 2.3.4 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Jonnatan Oyarzún | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | dql, sqlserver | ||
| Environment: |
Windows 7, Apache 2 (xampp 1.8.1), PHP 5.4.7, Symfony 2.2.1 |
||
| Attachments: |
|
| Description |
|
When executing $query = $em->createQuery( Get the following error: An exception occurred while executing 'SELECT * FROM (SELECT m0_.NOMBRE AS NOMBRE0, m0_.FECHAINICIO AS FECHAINICIO1, m0_.FECHAFIN AS FECHAFIN2, ROW_NUMBER() OVER (ORDER BY FECHAINICIO1 DESC) AS doctrine_rownum FROM MEDICION m0_ WITH (NOLOCK) INNER JOIN ESTUDIO e1_ ON m0_.ESTUDIO_ID = e1_.ID INNER JOIN CLIENTE c2_ ON e1_.CLIENTE_ID = c2_.ID INNER JOIN USUARIO u3_ ON c2_.ID = u3_.CLIENTE_ID WHERE u3_.ID = ?) AS doctrine_tbl WHERE doctrine_rownum BETWEEN 1 AND 12' with params [2]: SQLSTATE[42S22]: [Microsoft][SQL Server Native Client 11.0][SQL Server]El nombre de columna 'FECHAINICIO1' no es válido. Attached the BD model regards |