March 2015
Intermediate to advanced
284 pages
6h 13m
English
CHAPTER 6
![]()
Collection Mapping
Collection mapping refers to the concept of an object in the database—an entity—that possesses references to a set of other objects, none of which exists outside the context of the owning object. An example is an order line item: an order has many line items, although it might exist without any. However, because a line item does not have any way to exist outside of the context of its order, the order might be said to have a collection of line items.
In Hibernate, this is modeled through the use of the standard Java API collections. An entity merely declares the correct type of collection, along with how to replicate ...
Read now
Unlock full access