title: Hibernate Named Query Using Like and % % operators?
body: <p>In my Hibernate JPA Sample code..</p>
  
  <pre><code>public List&lt;AttendeesVO&gt; addAttendees(String searchKeyword) {
      TypedQuery&lt;AttendeesVO&gt; query = entityManager.createQuery(" select at from AttendeesVO at where at.user.firstName LIKE :searchKeyword",AttendeesVO.class);
      query.setParameter("searchKeyword", searchKeyword+"%");
      return query.getResultList();
  }
  </code></pre>
  
  <p>it is working fine when giving entire String <code>firstName=Narasimham</code></p>
  
  <p>But it is not working when we give any character of <code>Narasimham</code> i.e <code>a</code> or <code>n</code></p>
  
  <p>Actually my thinking is i'm giving <code>Like</code> operator with <code>% %</code> so it working any character of given String..</p>