I want to perform search action on entered string. whatever user enter it should search on first name and last name column.
//pseudo hql query
Select E.someproperty .... from Entity E where upper(E.firstName || '' || E.lastName) like upper(+userEntered+'%') //
In above code I combined two column and did search on it. I want similar functionality using hibernate criteria. I have tried following query but it didn`t work
empCriteria.add(Restrictions.disjunction().add(Restrictions.ilike("firstName",
userEntered, MatchMode.START)).add(Restrictions.ilike("lastName", userEntered,
MatchMode.START)));
I know it is just or condition..please let me know is there way to combine two column and do search on using criteria query