jpa低版本是不支持用Page接口和query一起使用的,但是这个地方必须要用到稍微复杂原生sql查询,又要用到分页,只有找解决方案了。
贴代码:
@Query(value ="select * from player b left join mclub a on a._playid = b._id left join club c on c._id = a._clubid where c._pid =:id ORDER BY ?#{#pageable} ",
nativeQuery = true)
Page<Player> findPlayerByCreateid(@Param("id")Integer id,Pageable pageable);
```
后台的操作一样。控制台会报个异常

不影响业务的