This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Can anyone point me to a COMPLETE HQL reference guide? The Hibernate docs are a little anemic on the specification side of things. They give one or two kindergarten examples, but, for instance, leave out the LIKE operator entirely.
Failing this, can anyone tell me how to use the LIKE operator in HQL queries? Is "from MyObject where MyField like :param" equivalent to the SQL "SELECT * FROM MyTable where MyColumn LIKE '%param%'"
or LIKE '%param' ?
or LIKE 'param%' ?
The hql documentation (such as it is) is silent on the subject. Help!
Like and wildcards behave exactly the same in SQL and HQL. So:
in HQL is synonymous with:
Can't help you with a free HQL reference. The Hibernate books offer more complete examples. Its worth getting the Hibernate tools plugin for eclipse since this includes a perspective from which you can run arbitrary HQL.