Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JPQL parser can't handle an attribute named "power" #3143

Closed
sdusart opened this issue Sep 6, 2023 · 2 comments
Closed

JPQL parser can't handle an attribute named "power" #3143

sdusart opened this issue Sep 6, 2023 · 2 comments
Assignees
Labels
in: query-parser Everything related to parsing JPQL or SQL type: regression A regression from a previous release

Comments

@sdusart
Copy link

sdusart commented Sep 6, 2023

Similar (I think) to #3028, a query using an attribute named power fails with this error :

BadJpqlGrammarException: Line 1:18 no viable alternative at input 'e.power'; Bad JPQL grammar [select distinct e.power.id from MyEntity e]

Environment :

  • springboot:3.1.3
  • JDK 17.0.8-zulu
  • Debian GNU/Linux 12
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 6, 2023
@sdusart
Copy link
Author

sdusart commented Sep 6, 2023

IIRC, having power in a package name triggers an error too.

@gregturn gregturn self-assigned this Sep 8, 2023
@gregturn gregturn added type: regression A regression from a previous release in: query-parser Everything related to parsing JPQL or SQL and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 8, 2023
@gregturn gregturn added this to the 3.1.4 (2023.0.4) milestone Sep 8, 2023
gregturn added a commit that referenced this issue Sep 8, 2023
See #3143
 Please enter the commit message for your changes. Lines starting
gregturn added a commit that referenced this issue Sep 8, 2023
See #3143
 Please enter the commit message for your changes. Lines starting
@gregturn
Copy link
Contributor

gregturn commented Sep 8, 2023

Thanks @sdusart! That's fixed, merged to main, and backported to 3.1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: query-parser Everything related to parsing JPQL or SQL type: regression A regression from a previous release
Projects
None yet
Development

No branches or pull requests

3 participants