O'Reilly logo

Java Persistence with Hibernate, Second Edition by Christian Bauer, Gavin King, and Gary Gregory

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 16. Advanced query options

In this chapter

  • Transforming query results
  • Filtering collections
  • Query-by-criteria with the Hibernate API

This chapter explains query options that you may consider optional or advanced: transforming query results, filtering collections, and the Hibernate criteria query API. First, we discuss Hibernate’s ResultTransformer API, with which you can apply a result transformer to a query result to filter or marshal the result with your own code instead of Hibernate’s default behavior.

In previous chapters, we always advised you to be careful when mapping collections, because it’s rarely worth the effort. In this chapter, we introduce collection filters, a native Hibernate feature that makes persistent collections ...

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