What this book covers
Chapter 1, Setting Up Hibernate, provides the basics of hibernate and the persistent class. Next, you will learn to obtain the required libraries, XML and annotation-based configuration, and the mapping required for hibernate.
Chapter 2, Understanding the Fundamentals, takes you through the basic objects required to start working with hibernate, such as SessionFactory
, Session
, Criteria
, Projection
, and so on.
Chapter 3, Basic Annotations, covers the very basic annotations that are useful and necessary while writing with hibernate, such as declaring table (@Table
), declaring column (@Column
), declaring primary key (@Id
), and so on.
Chapter 4, Working with Collections, explains how collections work with hibernate and how to persist Java collections such as List
, Map
, Set,
and so on using hibernate.
Chapter 5, Working With Associations, helps you to understand relationships and associations such as one-to-one, one-to-many (many-to-one), and many-to-many. In this chapter, you will discover the simplest way to implement a relationship using hibernate.
Chapter 6, Querying, applies the basics of hibernate to query a database. This chapter helps you to understand the fundamentals of hibernate such as alias, subquery, NamedQuery, formula, and HQL.
Chapter 7, Advanced Concepts, helps you to learn the advanced concepts in hibernate such as caching, inheritance strategy, versioning, and maintaining the history of the objects.
Chapter 8, Integration with Other Frameworks, explains integration with other MVC frameworks such as Struts and Spring. It shows how to achieve a persistent life cycle in the frameworks.