Summary
This chapter presented the foundation of object-relational mapping. We discussed the definition of an owner entity. We also defined value types and showed you how to map these properly in the entity table or a separate table. You also learned the concepts around ID generation and how to N generate ID using JPA or Hibernate strategies. You combined the value types and ID generation to discuss composite IDs.
Furthermore, we discussed associations and their cardinalities, one-to-one, many-to-one, and many-to-many, and showed you how to map self-referencing tables. Later we showed how to instruct Hibernate to perform cascade operations on associated entities.
We also covered inheritance and how Hibernate handles them. We showed you various strategies ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access