Hibernate: Criteria vs. HQL

Posted by cretzel on Stack Overflow See other posts from Stack Overflow or by cretzel
Published on 2008-10-13T12:47:33Z Indexed on 2010/05/29 10:32 UTC
Read the original article Hit count: 530

Filed under:
|
|

What are the pros and cons of using Criteria or HQL? The Criteria API is a nice object-oriented way to express queries in Hibernate, but sometimes Criteria Queries are more difficult to understand/build than HQL.

When do you use Criteria and when HQL? What do you prefer in which use cases? Or is it just a matter of taste?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about hql