Hibernate makes it easy to employ a fine-grained domain model. That means you can have more classes than tables. In other words, you can map a single record in a table to more than one class. You do so by having one class of type
Entity and the others of
Hibernate classifies objects as either
entity type or
value type. An object of
entity type is an independent entity and has its own lifecycle. It has its own primary key and hence its own database identity. A
value type doesn't have an identifier. A
value type belongs to an entity.
Value type objects are bound by the lifecycle of the owning entity instance. When a
value type is persisted, the
value type's state is persisted in the owning entity's table ...