1
Does anyone know how to cast a String
for int
within the query in this query, the variable "searchString"?
@Query("SELECT s FROM StoreOrder s INNER JOIN s.user u WHERE lower(u.fullname) LIKE %:searchString% OR u.totalamount=:searchString")
public Page<StoreOrder> findBySearch(@Param("searchString") String searchString, Pageable pageable);
Strange to use the same parameter as a filter for two different fields in the query, no?
– Caffé