标签: jpa
@Query(value = "SELECT * FROM Customer order by ?1 DESC", nativeQuery = true) List getSortPage(String perameter);
它没有动态按列排序,并返回相同的结果
答案 0 :(得分:-1)
JPA按参数查询doesn't support ORDER BY用法。仅限WHERE和HAVING。
JPA
ORDER BY
WHERE
HAVING
Query