Hello,
Dose anyone know about a good HQL tutorial available online?
Thanks in advance.
chickens
Printable View
Hello,
Dose anyone know about a good HQL tutorial available online?
Thanks in advance.
chickens
Here are some good tutorials.
http://code.google.com/p/hypertable/wiki/HQLTutorial
http://docs.jboss.org/hibernate/stab.../queryhql.html
Hope this helps.
HQL
HQL stands for Hibernate Query Language, and is the data query language that comes with Hibernate. Hibernate is a Java-based library for accessing relational data. You can download Hibernate at www.hibernate.org
HQL is very similar to SQL, but has two powerful benefits:
A Simple Example: SQL vs HQL
A normal SQL query looks something like this:
In HQL, this same query looks something like this:Code:SELECT name
FROM customer
WHERE state = "CA"
Code:SELECT cust.name
FROM customer cust
WHERE cust.state = "CA"
Complete Hibernate 3.0 Tutorial
Hibernate lets you develop persistent classes following common Java idiom - including association, inheritance, polymorphism, composition and the Java collections framework. The Hibernate Query Language, designed as a "minimal" object-oriented extension to SQL, provides an elegant bridge between the object and relational worlds. Hibernate also allows you to express queries using native SQL or Java-based Criteria and Example queries. Hibernate is now the most popular object/relational mapping solution for Java.