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.
- depends on
-
NXP-10647 Add paging ability in Directory API
- Resolved