Hello! After the migration from Spring Boot 2.7.10 to Spring Boot 3.0.5 and from Hibernate 5.6.0.Final to Hibernate 6.2.2 Final The query form Spring-data-jpa for PostgreSQL is generated differently (please see link to repo with branches + examples) I am using JDK 17 Correto (17.07), and db is PostgreSQL 9.6.6 Before migration generated SQL query looks like this: select exportenti0_.uuid as uuid1_0_, exportenti0_.domain_uuid as domain_u2_0_, exportenti0_.created_by as created_3_0_, exportenti0_.created_date as created_4_0_, exportenti0_.updated_by as updated_5_0_, exportenti0_.updated_date as updated_6_0_, exportenti0_.version as version7_0_, exportenti0_.currency_ex_uuid as currency8_0_, exportenti0_.cutoff_time as cutoff_t9_0_, exportenti0_.data_domain_uid as data_do10_0_, exportenti0_.is_force as is_forc11_0_, exportenti0_.status as status12_0_, exportenti0_.is_use_latest_date as is_use_13_0_ from export exportenti0_ where exportenti0_.domain_uuid=? order by exportenti0_.updated_date desc limit ? – executes correctly. After the migration the same query looks like follows: {{ select e1_0.uuid, e1_0.created_by, e1_0.created_date, e1_0.currency_ex_uuid, e1_0.cutoff_time, e1_0.data_domain_uid, e1_0.domain_uuid, e1_0.is_force, e1_0.status, e1_0.updated_by, e1_0.updated_date, e1_0.is_use_latest_date, e1_0.version from export e1_0 where e1_0.domain_uuid=? order by e1_0.updated_date desc offset ? rows fetch first ? rows only}} Problem is with line desc offset ..... rows only which is added after query translation from java model to SQL at the end. As you may expected it crashes. org.postgresql.util.PSQLException: ERROR: syntax error at or near "$3" Position: 328 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713) ~[postgresql-42.6.0.jar:42.6.0] I am using the latest driver for postgreSQL, not sure what exactly is causing this issue. Link to examples with issue: Repo link Thank you in advance! Regards Krzysztof |