admin管理员组

文章数量:1122846

How can I solve this problem? Spring Boot application using olingo jpa processor v4 throws a incorrect syntax near 'limit' request error response after upgrade from Spring Boot 2.7.3 to 3.2.5 (java 11 to 17).

With the upgrade the olingo package was upgraded to olingo-jpa-processor-v4 2.1.3 from 1.1.1.

Tests with specific configuration for SQL server in application.yml

spring:
  jpa:
    properties:
      eclipselink.eclipselink.target-database: org.eclipse.persistence.platform.database.SQLServerPlatform
      hibernate:
        dialect: org.hibernate.dialect.SQLServerDialect
    show-sql: true
    hibernate:
      ddl-auto: none

use still SQL statements like this:

SELECT E0.ContactId S0 FROM T_Case E0 ORDER BY E0.InternalCaseId ASC LIMIT 10

In Spring Boot 2.7.3 the SQL statement was

SELECT E0.ContactId S0 FROM T_Case E0 ORDER BY E0.InternalCaseId DESC

It seems that in the previous olingo version the sql statement only ordered the result. After that it seems that it cut the result for the response to respond with only the top ten sql results.

In our project the old eclipselink was 2.7.9, the new one 4.0.3. Hibernate old was 5.6.9.Final, new one is 7.0.0.alpha3.

olingo-jpa-processor-v4 uses in its pom.xml

        <eclipseLink.version>4.0.3</eclipseLink.version>
        <hibernate.version>6.4.0.Final</hibernate.version>

Because it might be a olingo-jpa-processor-v4 issue, I posted there also.

本文标签: javaSpring Boot 3 with olingojpaprocessorv4 SQLServer errorincorrect syntax near 39limit39Stack Overflow