O'Reilly logo

Mastering Hibernate by Ramin Rad

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 4. Advanced Fetching

In this chapter, we will discuss various ways to fetch the data from the permanent store. In previous chapters, we have already seen some ways to fetch the data when working with annotated entities. Now, we will focus a little more on the annotations that are related to data fetch, Hibernate Query Language (HQL), execution of native SQL, criteria objects, and filters. We will also demonstrate how to perform pagination, which is a functionality that's very common in most enterprise applications.

We will cover the following topics in this chapter:

  • Fetching strategies
  • Hibernate Query Language
  • Native SQL
  • Criteria objects
  • Filters
  • Pagination

Fetching strategy

In Java Persistence API (JPA), you can provide a hint to fetch the data ...

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