title: Spring JPA @Query where clause with 'like' and 'or'
body: <p>I have the following query: </p>
  
  <pre><code>@Query("select c from Category c where ( (lower(c.name) like '%' || lower(:searchText) || '%') or (lower(c.description) like '%' || lower(:searchText)) || '%')")
  </code></pre>
  
  <p>My product is designed to run in multiple platform, I am getting an error on postgreSQL which is:</p>
  
  <blockquote>
    <p>PSQLException: ERROR: argument of OR must be type boolean, not type
    text.</p>
  </blockquote>
  
  <p>Which is undestandable since the like clause return strings. But I wasn't able to perform the search in one query request. So the question is how can I perform a search where the where conditions refer to 2 differnt columns and use the 'like' operator. </p>