SQLite with Hibernate/JPA LIMIT not working [solved]

Couldn’t get setMaxResults() / setFirstResult() to work properly in SQLite with Hibernate / JPA2. These ultimately boil down to SQL LIMIT/OFFSET. After much debug I found there is a problem in the widely distributed SQLiteDialect.java source.

The following needed adding, checkout the method name, code smell!

@Override
public boolean bindLimitParametersInReverseOrder() {
    return true;
}

Leave a comment

Your email address will not be published.