0

My Database is Oracle. I Have a simple named query, and I use JPA to try to paginate it:

query.setFirstResult(firstResult);
query.setMaxResults(maxResult);

The generated query does not generates the pagination (rownum).The Sql in the log does not have any sign of rownum or any pagination.

The Dialect is correct:

<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

The Driver I'm using:

<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>

Any suggestions would be appreciated Thanks

Tiago PC
  • 109
  • 1
  • 7
  • 1
    Does your query use collection joins? If so, Hibernate might be doing the paging in memory. Look for 'firstResult/maxResults specified with collection fetch; applying in memory!' in the logs – crizzis Mar 10 '21 at 17:14
  • thats it, thanks: https://stackoverflow.com/questions/11431670/how-can-i-avoid-the-warning-firstresult-maxresults-specified-with-collection-fe – Tiago PC Mar 10 '21 at 18:36

0 Answers0