9 Advanced entity association mappings

This chapter covers

  • Applying mapping through one-to-one entity associations
  • Using one-to-many mapping options
  • Creating many-to-many and ternary entity relationships
  • Working with entity associations with maps

In the previous chapter, we demonstrated a unidirectional many-to-one association, made it bidirectional, and finally enabled transitive state changes with cascading options. One reason we are discussing more advanced entity mappings in a separate chapter is that we consider quite a few of them rare or at least optional. It’s possible to only use component mappings and many-to-one (occasionally one-to-one) entity associations. You can write a sophisticated application without ever mapping a collection! ...

Get Java Persistence with Spring Data and Hibernate now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.