When I wannt to use limit statement to make a business, and the consloe tell me statement error. I check the SQL statement again in MySQL command line, it's normally, such as this process: Repository Layer:
public interface VideoRepository extends JpaRepository<Video, Integer> {
@Query(value = "select video_id, video_thumbnail_link, video_title, video_link, video_commodity_id from e_buy.video limit ?1,10", nativeQuery = true)
List<Video> limitByIndex(String index);
}
If I visit this interface the consloe will tell me this error, but, if I change the variable of "?1,10" into "1", it works, unfortunately the only 1 reultset is not my hope.
Now i just wannt to know why JPA support "HALF LIMIT" statement rather than fully limit statement? By the way, pageable is out of order resultset to transformation data, that's a reason why i would use MyBatis rather than Pageable function.