Skip to content

EqlParser prohibits the use of reserved words (JPQL aggregate functions) in entity field names #3829

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

Closed
sazonov opened this issue Apr 8, 2025 · 2 comments
Assignees
Labels
type: bug A general bug

Comments

@sazonov
Copy link

sazonov commented Apr 8, 2025

Attached you will find a reproducer that implements a sample application with JPA Entity "Item" containing field "size" and corresponding repository ItemRepository. The repository contains only one method with query select sum(i.size) from Item i.
Running this app leads to error org.springframework.data.jpa.repository.query.BadJpqlGrammarException: At 1:13 and token 'size', no viable alternative at input 'select sum(i.*size) from Item i'; Bad EQL grammar [select sum(i.size) from Item i].
If the field 'size' is renamed to 'sizeInBytes' the app is running with no errors.
If a query parser is switched to HqlParser the app is running fine as well.

EQLParseError.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 8, 2025
@mp911de mp911de self-assigned this Apr 8, 2025
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 8, 2025
@mp911de mp911de added this to the 3.3.11 (2024.0.11) milestone Apr 8, 2025
@mp911de mp911de closed this as completed in 8a70349 Apr 8, 2025
mp911de added a commit that referenced this issue Apr 8, 2025
mp911de added a commit that referenced this issue Apr 8, 2025
@mp911de
Copy link
Member

mp911de commented Apr 8, 2025

Thanks for letting us know, that's fixed now.

@sazonov
Copy link
Author

sazonov commented Apr 8, 2025

Great news! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants