I have search query that has many optional parameters and then search word field that searches many columns. Is it possible to use hibernate criteria for this purpose? I need to search many columns with same search word.
Example code (what is not working correctly)
if(isNotEmpty(searchWord))
{
criteria.add(Restrictions.like("description", searchWord));
criteria.add(Restrictions.like("name", searchWord));
}