Chapter 3. Working with Annotations

In this chapter, we will look at various annotations and how they are used. Most Hibernate and JPA annotations were created for a specific purpose. For that reason, annotations discussed in this chapter are grouped together according to what they are used for. Some annotations are specified in JPA and some are only available in Hibernate. We will mostly focus on Hibernate annotations, specifically the ones that are not documented well or may be tricky to use. The discussion on annotations is grouped based on the following:

  • Mapping and association
  • Behavior
  • The SQL/DDL modifier

You may have noticed that so far we have avoided the Hibernate configuration file and mostly focused on annotations. This is actually the ...

Get Mastering Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.