wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Difference between Criteria API and HQL Queries? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Difference between Criteria API and HQL Queries?" Watch "Difference between Criteria API and HQL Queries?" New topic
Author

Difference between Criteria API and HQL Queries?

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
what is the different between Criteria Query and HQL Query ?
Christian Dillinger
Ranch Hand

Joined: Jul 20, 2009
Posts: 188
It's explained in the Hibernate docu which should be read before building a real life application...

HQL is a little bit like SQL. Some kind of textual representation of your query. Criteria can be used in a more OO- and dynamic way.
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4968
    
    1

HQL is a query language, not totally dissimilar from SQL.



Quick Tutorial on HQL

The Criteria API allows you to build database queries in an object oriented manner using your domain model.



Creating Queries using the Hibernate Criteria API Tutorial

-Cameron McKenzie

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Criteria API and HQL Queries?
 
Similar Threads
hibernate subqueries
How do I create Hibernate criteria when using a many to one mapping
Three Table/Class Combination Display?
Difference between HQL and DetachedCriteria
HQL Query return type