Java Persistence with Hibernate cover
welcome to this free extract from
an online version of the Manning book.
to read more

About this Book


This book is both a tutorial and a reference for Hibernate and Java Persistence. If you’re new to Hibernate, we suggest that you start reading the book with chapter 1 and begin coding with the “Hello World” tutorial in chapter 2. If you’ve used an older version of Hibernate, you should read the first two chapters quickly to get an overview and then jump into the middle with chapter 3. We will, whenever appropriate, tell you if a particular section or subject is optional or reference material that you can safely skip during your first read.


This book is divided into five major parts.

In part 1, “Getting started with ORM,” we discuss the fundamentals behind object/relational mapping. We walk through a hands-on tutorial to get you started with your first Hibernate project. We look at Java application design for domain models and at the options for creating object/relational mapping metadata.

Part 2, “Mapping strategies,” focuses on Java classes and their properties, and how they map to SQL tables and columns. We explore all basic and advanced mapping options in Hibernate and Java Persistence. We show you how to deal with inheritance, collections, and complex class associations. Finally, we discuss integration with legacy database schemas and some mapping strategies that are especially tricky.

Who should read this book?

Code conventions

Source code downloads

Author Online

About the authors