Mixed parameter strategies - use just one of named, positional or JPA-ordinal strategy

昨晚做jpa分页时候报出的一个错误,又是一顿苦苦查找,网上资料非常少,有的说是占位符的问题,再一看我做分页的sql是这么写的,

.......... d on a.OUT_STATION_NO=d.STATION_NO where a.USER_ID := userId  order by ?#{#pageable}", nativeQuery = true)

关键点在于红色部分,改为:解决!

........... d on a.OUT_STATION_NO=d.STATION_NO where a.USER_ID = ?1  order by ?#{#pageable}", nativeQuery = true)
发布了107 篇原创文章 · 获赞 36 · 访问量 122万+

猜你喜欢

转载自blog.csdn.net/zoucui/article/details/102605562