Java Persistence API: Embedding Collections & Managing Cascade Operations


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

In this course, you'll explore how nested collections within an outer entity can be mapped using JPA. You'll implement mappings for collections of primitive types, embeddable objects, and collections of entities. You'll examine how JPA and Hibernate handle list, set, and map collections.

Next, you'll relate how specific operations such as entity persistence, update, and removal can be cascaded from parent entities to child entities and illustrate how inheritance relationships in your code can be mapped to database tables.

Once you're done with this course, you'll be able to use nested collections within your entities and also map inheritance relationships in your code to meaningful representations using tables.



Expected Duration (hours)
2.0

Lesson Objectives

Java Persistence API: Embedding Collections & Managing Cascade Operations

  • discover the key concepts covered in this course
  • define collection mapping for primitive data types
  • configure lazy and eager loading for collections
  • persist collections using the Set interface
  • persist nested objects in collections
  • persist collections defined using the Map interface
  • configure maps using @MapKeyColumn and @MapColumn
  • use embeddable objects as map values
  • use entities as map values
  • use entities as map keys
  • recall the implications of cascade type NONE
  • summarize the effects of cascade type PERSIST and REMOVE
  • summarize the effects of cascade type MERGE
  • summarize the effects of cascade type DETACH and ALL
  • apply the @MappedSuperclass annotation to parent classes
  • recall the effects of persisting derived entities with a mapped superclass
  • use the SINGLE_TABLE inheritance to store all entities in a single table
  • specify discriminator columns with specific discriminator values
  • configure entities to handle null and unknown discriminator values
  • use the TABLE_PER_CLASS inheritance to store entities in multiple tables
  • use the JOINED inheritance to store entities in multiple tables
  • summarize the key concepts covered in this course
  • Course Number:
    it_jmjpehdj_04_enus

    Expertise Level
    Expert