%Like% Query in spring JpaRepository

前端 未结 10 1668
南方客
南方客 2020-12-04 11:36

I would like to write a like query in JpaRepository but it is not returning anything :

LIKE \'%place%\'-its not working.

LIKE

10条回答
  •  醉梦人生
    2020-12-04 11:59

    You can have one alternative of using placeholders as:

    @Query("Select c from Registration c where c.place LIKE  %?1%")
    List findPlaceContainingKeywordAnywhere(String place);
    

提交回复
热议问题