here's my query
SELECT
tb.id AS id,
tb.title AS title
FROM
tbl_batter tb
WHERE tb.`title` LIKE '%waugh%' ;
here's the code at repository
@Repository
public interface BatterRepository extends JpaRepository<Batter, Long> {
@Query(value = "SELECT \n" +
" tb.id AS id,\n" +
" tb.title AS title \n" +
"FROM\n" +
" tbl_batter tb \n" +
"WHERE tb.`title` LIKE %:searchKey%", nativeQuery = true)
List<Object[]> getData(@Param("searchKey") String searchKey);
}
Would be a huge favor if anyone could tell what I'm doing wrong while using version 2.3.3 I'm getting list empty while using 2.3.3 and getting list of 2 objects while using 1.5.7
I'm suppose to get 2 objects in the list and that's not happening in case of using 2.3.3