Lets say I have one table with two columns firstname and lastname with String datatype. Normally I write my hql query like
firstname
lastname
\"selec
I did it so with hql
public List findContracts(String fullName) { Query q = sessionFactory.getCurrentSession().createQuery("from Contract c where :fullName = concat(c.firstname, ' ', c.lastname)"); q.setString("fullName", fullName); return q.list();}