Skip to main content
Book cover

Pro JPA 2 pp 95–116Cite as

Apress

Collection Mapping

  • Chapter
  • First Online:
  • 799 Accesses

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    Assuming that the collection was not returned from a second level shared cache.

  2. 2.

    See the javadoc for java.util.Map for more details.

  3. 3.

    The @MapKey annotation is still required, however; otherwise, the @MapKeyColumn defaults would apply.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Mike Keith

About this chapter

Cite this chapter

Keith, M., Schincariol, M. (2013). Collection Mapping. In: Pro JPA 2. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4927-6_5

Download citation

Publish with us

Policies and ethics