I have been using criteria queries in favor of HQL queries quite a bit latley, so I thought I would do a quick post of what a query would look like in HQL and then the same query written as a criteria query.
Some of the reasons I like to use criteria queries are
- No building up query strings and concatenating them to build a complex query
- Powerful Object Oriented API
You can learn more...