Say, I've a table called "Contact" with "first_name" and "last_name" as columns in it. Basically, "select concat(c.firstname, ' ', c.lastname) as fullname from Contact c" is what I want to do in hibernate.
I can put the entire query inside createQuery and get desired output. But, I don't want to execute sql queries in hibernate. I found a similar post here "Can we concatenate two properties in Hibernate HQL query?". But this executes sql query and of course it has concat in where clause(I want in select clause).
Somebody please suggest an answer.