一般的排序代碼是這樣的
Sort sort = new Sort(Direction.ASC, "seq");
PageRequest pageRequest = PageRequest.of(Integer.valueOf(pageNumber) - 1, Integer.valueOf(pageSize), sort);
page = questionTypeService.findAll(pageRequest);
但是會報以下的錯誤
Hibernate: select questionty0_.questionTypeId as question1_3_, questionty0_.remark as remark2_3_, questionty0_.seq as seq3_3_, questionty0_.type as type4_3_, questionty0_.version as version5_3_ from question_type questionty0_ order by questionty0_.seq asc offset 0 rows fetch next ? rows only
2020-03-10 16:20:36.402 WARN 12036 --- [io-8080-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 102, SQLState: S0001
2020-03-10 16:20:36.403 ERROR 12036 --- [io-8080-exec-10] o.h.engine.jdbc.spi.SqlExceptionHelper : Incorrect syntax near 'offset'.
看到報錯語句中有offset 0 rows fetch next ? rows only這幾個單