I investigated it a little bit and found BasicBinder only applies for the SQL query string. Internally both .setFirstResult() and .setMaxResults() won’t touch SQL query string but populate QueryOption. Only the query string together with parameters will belong to the scope of BasicBinder. The issue is confusing for the ‘limit ? offset ?’ does show up in the logged SQL statement, maybe we should consider the log to reflect the difference between QueryOption and query per se? |