Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-20312

Fix NXQL query maker for mssql

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.4-SNAPSHOT
    • Fix Version/s: 8.10
    • Component/s: Core VCS

      Description

      See test failures at https://qa.nuxeo.org/jenkins/view/reports/job/master/job/nuxeo-master-fullbuild-part1-multidb-linux/97/Slave=MULTIDB_LINUX,dbprofile=mssql,jdk=java-8-oracle/

      org.nuxeo.ecm.core.storage.sql.TestSQLBackend.testQueryComplexOrderBy

      org.nuxeo.ecm.core.api.NuxeoException: Invalid query: NXQL: SELECT tst:subjects/*1 FROM TestDoc WHERE ecm:isProxy = 0 AND tst:title = 'hello world' ORDER BY tst:subjects/*1
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:929)
      	...
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.queryAndFetch(SessionImpl.java:1273)
      	at org.nuxeo.ecm.core.storage.sql.SessionImpl.queryAndFetch(SessionImpl.java:1265)
      	at org.nuxeo.ecm.core.storage.sql.TestSQLBackend.testQueryComplexOrderBy(TestSQLBackend.java:3869)
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: A column has been specified more than once in the order by list. Columns in the order by list must be unique.
      	...
      	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:284)
      	at org.tranql.connector.jdbc.PreparedStatementHandle.executeQuery(PreparedStatementHandle.java:52)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.ResultSetQueryResult.<init>(ResultSetQueryResult.java:76)
      	at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.queryAndFetch(JDBCMapper.java:927)
      	... 47 more
      

      same on org.nuxeo.ecm.core.storage.sql.TestSQLBackendNoProxies.testQueryComplexOrderBy and org.nuxeo.ecm.core.storage.sql.TestSQLBackendSoftDelete.testQueryComplexOrderBy and org.nuxeo.ecm.core.TestSQLRepositoryQuery.testQueryDistinct

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: