Here is an example HQL query:
Query q = this.entityManager.createQuery("SELECT * FROM User u where lower(u.firstName)=:firstName");
q.setParameter("firstName", firstName.toLowerCase());
In this case lower() will convert the firstName property to lower case allowing you to do case insensitive search.
No comments:
Post a Comment