【发布时间】:2021-09-11 02:55:29
【问题描述】:
我需要帮助!如何在@query nativeSql jpa 中设置列。我对此进行了测试,它给出了这样的错误!我认为参数不起作用
@Query(value = "select * from usernotvalid order by ?1 ?2 offset ?3 limit ?4",nativeQuery = true)
public List<User> findAllNotValid(String colonne,String ordre,int debut,int fin);
【问题讨论】:
-
这是错误:org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou près de « $2 » Position : 40
-
这是代码:@Query(value = "select * from usernotvalid order by ?1 ?2 offset ?3 limit ?4",nativeQuery = true) public List findAllNotValid(String Colonne,String ordre,int 首次亮相,int fin);
标签: java spring postgresql spring-boot spring-data-jpa