Reputation: 13
I need help please! how to set up the column in @query nativeSql jpa. I test that and it gives an error like this! I believe that the parameter does not work
@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);
Upvotes: 1
Views: 2403
Reputation: 49410
You need a comma between columns in ORDER BY
@Query(value = "select * from usernotvalid order by ?1, ?2 offset ?3 limit ?4",nativeQuery = true)
Upvotes: 1