Skip to content

Instantly share code, notes, and snippets.

@alexzhan
Created November 10, 2010 00:33
Show Gist options
  • Save alexzhan/670126 to your computer and use it in GitHub Desktop.
Save alexzhan/670126 to your computer and use it in GitHub Desktop.
findbyname lowersearch search likesearch like hibernate
public List findByName(String name) {
String query = "from SnVideo s where lower(s.name) like :name";
return getHibernateTemplate().findByNamedParam(query, "name", "%" + name.toLowerCase() + "%");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment