You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Native query validation does not accept a numbered parameter as limit argument #1938
The SQL query parser does not accept using a parameters for a limit.
MySQL: no viable alternative at input 'select * from user_history h where h.user_id = ?1 order by h.timestamp desc limit ?' [SQL_SYNTAX]
Using 5.2.0.202606090740 in Eclipse.
To Reproduce
Define a native query in a Spring Data JpaRepository.
@Query(value = "select * from user_history h where h.user_id = ?1 order by h.timestamp desc limit ?2", nativeQuery = true)
List<UserHistory> findUserHistory(StringuserId, intlimit);
Activity
elmuerte commentedon Jul 17, 2026
Named parameters are not accepted either.