title: hibernate Query to find record based on substring
body: <p>I want to make a Hibernate query to check if a string contains a substring.</p>
  
  <p>Suppose a user class having id,name,info.</p>
  
  <p>info is String which contain multiple substrings.</p>
  
  <p>For example info contains strings like "hi I am from Pune".
  I want to read all record which contain Pune as substring.
  I tried using like query but not working.</p>
  
  <pre><code>Criteria criteria = session.createCriteria(Post.class);
  criteria.add(Restrictions.like("content",contentStringToLook));
  users = (List&lt;Post&gt;)criteria.list();
  </code></pre>