This content has been marked as final. Show 2 replies
I got problem in hibernate query, when i tries to set order by clause on the entity column.
For eg. if in user table i have a foreign key on department. Then for fetching the information from user, i have written the hibernate query as
Select user From User user order by department.
Now in this case hibernate is not able to parse the query. In other case if i use alias in front of order by column like : Select user From User user order by user.department. It works fine. Is it some problem in hibernate or am i missing something.