Named Query with like in where clause

前端 未结 4 1177
无人及你
无人及你 2020-12-29 03:49

Is it possible to have a like in a where clause in a named query? I am trying to do the following but am getting exceptions

@NamedQuery(name = \"Place.getPla         


        
4条回答
  •  醉酒成梦
    2020-12-29 04:05

    @Query("select c from Curso c where c.descripcion like CONCAT(:descripcion,'%')")
    
    List findByDescripcionIgnoreCase(@Param("descripcion") String descripcion);
    

提交回复
热议问题