Java Persistence API: Embedding Collections & Managing Cascade Operations

Java JPA    |    Expert
  • 22 Videos | 2h 8m 17s
  • Includes Assessment
  • Earns a Badge
Likes 3 Likes 3
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.

WHAT YOU WILL LEARN

  • 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

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 12s
    UP NEXT
  • Playable
    2. 
    Collection Mapping for Primitive Types
    5m 37s
  • Locked
    3. 
    Eager and Lazy Loading
    5m 2s
  • Locked
    4. 
    Persistent Collections Using a Set
    3m 11s
  • Locked
    5. 
    Persistent Collections Using Embeddables
    4m 33s
  • Locked
    6. 
    Persistent Collections Using Maps
    4m 41s
  • Locked
    7. 
    Configuring Maps Using MapKeyColumn and MapColumn
    3m 26s
  • Locked
    8. 
    Map Collections: Embeddables as Map Values
    4m 38s
  • Locked
    9. 
    Map Collections: Entities as Values
    6m 17s
  • Locked
    10. 
    Map Collections: Entities as Keys
    6m 49s
  • Locked
    11. 
    Cascade Type NONE
    6m 26s
  • Locked
    12. 
    Cascade Type PERSIST and REMOVE
    5m 24s
  • Locked
    13. 
    Cascade Type MERGE
    4m 46s
  • Locked
    14. 
    Cascade Type DETACH and ALL
    5m 21s
  • Locked
    15. 
    The Mapped Superclass
    9m 6s
  • Locked
    16. 
    Mapped Superclass: Persisting and Loading Entities
    5m 31s
  • Locked
    17. 
    Inheritance Type SINGLE_TABLE