Lesson 5 of 618 minModule progress 0%

Module 15: Database Access

Entity Relationships & Cascading

Model one-to-many, many-to-many, and cascading operations safely.

Use @OneToMany/@ManyToOne with mappedBy to control ownership and join columns.

Configure fetch strategies (LAZY vs EAGER) to balance performance with convenience.

Cascade operations carefully—CascadeType.REMOVE can delete child entities unintentionally.

Advertisement

Lesson check

Which fetch type delays loading until accessed?

Next lesson →