Hello,
is there a possibility to quote an alias or property within HQL (not SQL)? The following hql-query is generated
automatically from my application, but is not recognizeds as a valid one, due to the usage of the "order" keyword as an alias name:
Code:
select o from mymodel.Invoice as o left join o.order as order order by order.orderId
causes the following error:
BY expected after GROUP or ORDERI looked at the HQL definition, but I wasn't able to find any HQL quote characters. I've tried {} or `` as quotes for the "order" alias, without success. My current solution is to rename the alias in "order_", but I think a general quoting of alias or properties will be a better solution.
Thanks
Peter
Hibernate version:3.0.5 Mapping documents:Code between sessionFactory.openSession() and session.close():Full stack trace of any exception that occurs:Name and version of the database you are using: MS SQL Server The generated SQL (show_sql=true):Debug level Hibernate log excerpt:[/code]