我正在尝试在spring-data上创建可分页的存储库。这是样品
UNIQUE KEY `TITLE_UNIQUE` (`title`), <-- remove comma
ON DELETE NO ACTION ON UPDATE NO ACTION
问题在于,我在日志中看到休眠状态没有设置限制和偏移量
interface OrganizationJurDao : PagingAndSortingRepository<OrganizationJur, UUID> {
@Query("select o from OrganizationJur o left join fetch o.sro",
countQuery = "select count(o) from OrganizationJur o")
fun getAll(pageable: Pageable): Page<OrganizationJur>
}
我也尝试使用EntityGraph,但是结果是相同的-当我获取数据时,休眠状态不会添加限制和偏移量