Closed
Description
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.