I'm trying out using Spring Data JPA with Hibernate and Oracle 11g. I could have sworn I had this working before, but I haven't touched the code in a few weeks and just got back to it so I'm not positive
In my repository interface I have a method like this:
When I run the application I am getting a "ORA-00933: SQL command not properly ended" error. There are two sqls from Hibernate that is displaying in the logs. One is to get a count of how many rows will be returned and that seems to be ok.
public Page<Log> findByCreateByDttmAfter(Date createByDate, Pageable pageable);
The second one is what's causing the issue:
select count(*) as col_0_0_ from LOG log0_ where log0_.CREATE_BY_DTTM>?
If I remove the limit clause in an oracle client, the sql will work. I don't THINK oracle has a limit clause but uses a rownum < ? type of thing. Is Hibernate creating this sql or is this Spring Data? Is there something special I need to set for Oracle?
from LOG log0_ where log0_.CREATE_BY_DTTM>? order by log0_.CREATE_BY_DTTM desc limit ?