[ 
https://issues.apache.org/jira/browse/OPENJPA-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-2948.
--------------------------------------
    Resolution: Not A Problem

Per the specification (section 4.4.1 / the reserved identifier list in Jakarta 
Persistence 3.2) these words are reserved identifiers, so rejecting them as 
identification variables and result aliases is correct behaviour. The breaking 
change is documented in the migration guide: 
openjpa-project/src/doc/manual/migration_considerations.xml, section 
jpa_4.2_JPQLReservedIdentifiers ("New JPQL Reserved Identifiers"). It lists the 
new keywords, shows the queries that stop parsing (e.g. SELECT e.id AS id ... 
ORDER BY id), explains which keywords can still be used as path components, and 
states that there is no soft-keyword mode and no compatibility option. Closing 
as Not A Problem since the documentation is already in place.

> New JPQL keywords no longer usable as aliases
> ---------------------------------------------
>
>                 Key: OPENJPA-2948
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2948
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Romain Manni-Bucau
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion link: 
> https://github.com/apache/openjpa/pull/144#discussion_r3682999074
> (medium) identification_variable() only accepts <IDENTIFIER>, so every newly 
> introduced token (ID, VERSION, RIGHT, ON, NULLS, FIRST, LAST, CAST, STRING, 
> UNION, INTERSECT, EXCEPT, TREAT, ...) can no longer be used as an 
> identification variable or result alias. Existing queries like SELECT e.id AS 
> id ... ORDER BY id or aliases named first/on now fail to parse - a 
> backward-compat regression worth documenting or mitigating with soft keywords.
> (re line 1560, outside the diff hunks)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to