Collections may contain almost any other Hibernate type, including all basic types, custom types, components, and of course, references to other entities. This is an important distinction: an object in a collection might be handled with "value" semantics (its lifecycle fully depends on the collection owner) or it might be a reference to another entity, with its own lifecycle. In the latter case, only the "link" between the two objects is considered to be state held by the collection.
The contained type is referred to as the collection element type. Collection elements are mapped by
<composite-element>, or in the case of entity references, with
<many-to-many>. The first two map elements with value semantics, the next two are used to map entity associations.