title: Criteria Builder Convert Lower
body: <p>I have the following Predicate condition</p>
  
  <pre><code>  predicate = 
    cb.like(root.get(Product_.prodName),prod.getProductName());
  </code></pre>
  
  <p>How to use lower in the above starement, I have tried as</p>
  
  <pre><code>predicate = 
  cb.like(cb.lower(root.get(Product_.prodName), prod.getProdName());
  </code></pre>
  
  <p>However it gives me the following error</p>
  
  <pre><code>method lower(javax.persistence.criteria.Path&lt;java.lang.String&gt;,
  java.lang.String) not found in interface 
  javax.persistence.criteria.CriteriaBuilder
  </code></pre>
  
  <p>What is the correct way to convert to lower?</p>