[
https://issues.apache.org/jira/browse/OPENJPA-2948?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106218#comment-18106218
]
Maxim Solodovnik commented on OPENJPA-2948:
-------------------------------------------
Comment by [~cristof]:
Per spec
(https://jakarta.ee/specifications/persistence/3.2/jakarta-persistence-spec-3.2#a4760),
many of the referenced tokens are reserved identifiers, and it suggests
reserved SQL words should also be avoided as identifiers.
Do you really think we should make some change about this behavior?
> 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)