O'Reilly logo

Beginning Hibernate: From Novice to Professional by Jeff Linwood, Dave Minter

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

CHAPTER 9Searches and Queries

In the last chapter, we discussed how the Hibernate session is used to interact with the database. Some of the session's methods take query strings in their parameter lists or return Query objects. These methods are used to request arbitrary information from the database. In order to fully show how they're used, we must introduce you to the HQL used to phrase these requests. As well as extracting information (with SELECT), HQL can be used to alter the information in the database (with INSERT, UPDATE, and DELETE). We cover all of this basic functionality in this chapter. Hibernate's query facilities do not allow you to alter the database structure.

HQL is an object-oriented query language, similar to SQL, but instead ...

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