File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Criteria API and HQL Queries?

 
Samanthi perera
Ranch Hand
Posts: 510
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the different between Criteria Query and HQL Query ?
 
Christian Dillinger
Ranch Hand
Posts: 195
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4968
1
Hibernate Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic