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

Allow directory query limit on old SQL Server

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.10-HF04, 8.2
    • Component/s: Directory

      Description

      SQL Server < 2012 doesn't have a primitive for easily adding a LIMIT in a query (see DialectSQLServer.supportsPaging). This is a problem for directory SQLSession.query which takes a limit parameter and fails if the limit is set in this configuration. This in turn is a problem for at least one use case:

      java.lang.UnsupportedOperationException: Trying to use paging with an unsupported dialect: org.nuxeo.ecm.core.storage.sql.jdbc.dialect.DialectSQLServer
      	at org.nuxeo.ecm.directory.sql.SQLSession.query(SQLSession.java:903)
      	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.queryProviders(OAuth2ServiceProviderRegistryImpl.java:110)
      	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.getProvider(OAuth2ServiceProviderRegistryImpl.java:71)
      	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.registerCustomProviders(OAuth2ServiceProviderRegistryImpl.java:157)
      	at org.nuxeo.ecm.platform.oauth2.providers.OAuth2ServiceProviderRegistryImpl.applicationStarted(OAuth2ServiceProviderRegistryImpl.java:152)
      	at org.nuxeo.runtime.model.impl.RegistrationInfoImpl.notifyApplicationStarted(RegistrationInfoImpl.java:332)
      

      Instead of failing, we should do the limit by hand after a full query.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: