Open Riva-Tholoor-Philip opened 2 weeks ago
Got the same error on a slightly different query
H2EclipseLinkTest$JPA>AbstractJPATest.alias:289 ? IllegalArgument An exception occurred while creating a query in EntityManager:
Exception Description: Syntax error parsing [select cat.id as id
from Cat cat].
[17, 19] The identification variable 'id' cannot be a reserved word.
Works fine on hibernate or previous version of eclipselink
When omitting the optional entity identification variable for entity attributes named id and version which are arguments to a constructor in a
SELECT
clause, EclipseLink misinterprets these as theid
(...) andversion
(...) operations. They should not be interpreted this way because they are not followed by a(
character.SELECT NEW test.jakarta.data.jpa.web.Rebate(id, amount, customerId, purchaseMadeAt, purchaseMadeOn, status, updatedAt, version) FROM RebateEntity WHERE customerId=?1 AND status=test.jakarta.data.jpa.web.Rebate.Status.PAID ORDER BY amount DESC, id ASC
Error stack is: