Open
Description
Attached you will find a reproducer that implements a sample application with JPA Entity "Item" containing field "date" and corresponding repository ItemRepository.
The repository contains only one method with query select "select i from Item i where cast(i.date as date) <= cast(:currentDateTime as date)".
Running this app leads to error
Caused by: org.springframework.data.jpa.repository.query.BadJpqlGrammarException: At 1:39 and token 'as', no viable alternative at input 'select i from Item i where cast(i.date *as date) <= cast(:currentDateTime as date)'; Bad EQL grammar [select i from Item i where cast(i.date as date) <= cast(:currentDateTime as date)]
'org.springframework.boot' version '3.4.5'