I am using like condition is JPA, I am facing the issue.
@Query("select new com.tivo.extract.config.model.DTO(s.SourceId, s.SourceName, t.TvsourceLongName) from MyTelevisionSource t join fetch RCMSource s ON s.SourceId = t.SourceId where s.SourceId LIKE ?1% ")
List<DTO> findFilteredSourceList(String seachInput);
If i am using s.SourceId
like %?1% --> %searchInput% ->
its working
but for s.SourceId
LIKE ?1% -> searchInput% ->
its not working
SourceId
column in Long type in DB.
I am getting an exception:
Parameter value [021%] did not match expected type [java.lang.Long (n/a)];
nested exception is java.lang.IllegalArgumentException:
Parameter value [021%] did not match expected type [java.lang.Long (n/a)]