Abstract
Sometimes a collection is used like a milk crate: it’s just a simple container with no apparent order or intended organization. Other cases demand some kind of system of order and arranging so the way objects are retrieved from the collection has meaning. Whether the collection is of the first type or the second, collections of objects require more effort to map than single objects, although in compensation they offer greater flexibility.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Assuming that the collection was not returned from a second-level shared cache.
- 2.
See the Javadoc for java.util.Map for more details.
- 3.
The @MapKey annotation is still required, however; otherwise, the @MapKeyColumn defaults would apply.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Mike Keith, Merrick Schincariol, Massimo Nardone
About this chapter
Cite this chapter
Keith, M., Schincariol, M., Nardone, M. (2018). Collection Mapping. In: Pro JPA 2 in Java EE 8. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3420-4_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3420-4_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3419-8
Online ISBN: 978-1-4842-3420-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)