Open johnmanko opened 2 years ago
This is still a problem with Payara 5.2022.3 (using Eclipselink 2.7.9.payara-p2
) and MS SQL JDBC mssql-jdbc-11.2.0.jre11.jar
.
Can I get some feedback on this? Again, according to Microsoft, this is an Eclipselink issue.
According to Microsoft, the following issue is a problem with EclipseLink. Perhaps this can be verified.
Microsoft SQL Server JDBC Driver version
10.2.0
and9.4.1
EclipseLink version
2.7.9.payara-p1
Payara Server version
5.2022.1
SQL Server version
Client Operating System
Ubuntu 21.10
JAVA/JVM version
Table schema
Problem description
When using
javax.persistence.criteria.CriteriaBuilder
to query distinct records with an offset, the resulting SQL is invalid for SQL Server 2019.The generated SQL does not work on 2019. Earlier version of SQL generate different SQL statements.
Generated:
Generated with values:
Expected behavior
The follow is generated when running against
Microsoft SQL Server 2008 R2 (SP3-GDR) (KB4057113) - 10.50.6560.0 (X64) Dec 28 2017 15:03:48 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: )
:Actual behavior
SQL statement doesn't run because the generated
ORDER BY
andROW_NUMBER()
are not part of theDISTINCT
clause.Error message/stack trace
Error from Server Manager Studio:
Server log:
Any other details that can be helpful
JDBC trace logs
None available.