You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EclipseLink is not accepting the id(this) operation, which is new in Jakarta Persistence 3.2, when it is placed within a JPQL ORDER BY clause.
SELECT ID(THIS) FROM Prime WHERE ID(THIS) < ?1 ORDER BY ID(THIS) DESC
Here is the error:
Exception [EclipseLink-0] (Eclipse Persistence Services - 5.0.0-B03.v202409121024-4a7149f0cd04d7466837d70f68abb743c88acb83): org.eclipse.persistence.exceptions.JPQLException
Exception Description: Syntax error parsing [SELECT ID(THIS) FROM Prime WHERE ID(THIS) < ?1 ORDER BY ID(THIS) DESC].
[56, 64] The order by item is not a valid expression. (SELECT ID(THIS) FROM Prime WHERE ID(THIS) < ?1 ORDER BY [ ID(THIS) ] ...
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildException(HermesParser.java:175)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.validate(HermesParser.java:351)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.populateQueryImp(HermesParser.java:298)
at org.eclipse.persistence.internal.jpa.jpql.HermesParser.buildQuery(HermesParser.java:180)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:144)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.buildEJBQLDatabaseQuery(EJBQueryImpl.java:120)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:107)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.<init>(EJBQueryImpl.java:91)
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1846)
... 44 more
You can reproduce this by uncommenting the following Jakarta Data test: test.jakarta.data.web.DataTestServlet.testOrderByIdFunction()
Based on that, you should be able to create a reproducible that only uses JPA.
The text was updated successfully, but these errors were encountered:
EclipseLink is not accepting the id(this) operation, which is new in Jakarta Persistence 3.2, when it is placed within a JPQL ORDER BY clause.
Here is the error:
You can reproduce this by uncommenting the following Jakarta Data test:
test.jakarta.data.web.DataTestServlet.testOrderByIdFunction()
Based on that, you should be able to create a reproducible that only uses JPA.
The text was updated successfully, but these errors were encountered: