O'Reilly logo

Spring Persistence with Hibernate by Ahmad Seddighi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HQL

As mentioned earlier, HQL is an SQL-like, Hibernate-specific, and database independent language used to query persisted objects from the back-end rational database. Since Hibernate handles many relational storage issues, and solves the relevant problems when mapping the object-oriented world to the relational world, HQL is a great substitute for SQL when you're developing the object-oriented application which interacts with a relational database through Hibernate.

HQL is not a substitute for SQL. Rather, it lets us express our queries in an object-oriented form. When an HQL expression is executed, it is first transformed into an SQL statement. The generated SQL is then executed against the database, the result is placed in persistent objects, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required