On delete cascade
ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when their referenced row is deleted.
Java Persistence with Spring Data and Hibernate epub
ON DELETE CASCADE is a relational foreign-key action that automatically deletes referencing rows when the referenced row is deleted.
- How it is used
- Uses database-enforced cascading to remove dependent association rows efficiently when an owning row is deleted.
- How deep it goes
- Defines database-side deletion and schema annotation, but stops short of changing Hibernate runtime behavior.
- Examples
- Demonstrates Item and Bid deletion with H2, Hibernate @OnDelete, and a generated foreign-key cascade.
- What you can do after
- Operate/configure Hibernate schema generation with @OnDelete and verify whether the target DBMS supports the resulting foreign-key action.
Read how Java Persistence with Spring Data and Hibernate epub explains on delete cascade →
Build Financial Software with Generative AI (From Scratch)
ON DELETE CASCADE is a database referential action that automatically deletes dependent records when their referenced parent record is deleted.
- How it is used
- Prevents orphaned ACH hierarchy records by deleting dependent rows when parent records are removed.
- How deep it goes
- Defines the referential-action use case and hierarchy, but stops short of showing executable SQL or a deletion workflow.
- Examples
- Uses ACH file, batch header, entry, addenda, and control records to demonstrate dependent deletions.
- What you can do after
- Configure foreign keys with ON DELETE CASCADE to remove invalid dependent ACH records automatically.
Read how Build Financial Software with Generative AI (From Scratch) explains on delete cascade →
Related concepts
- foreign keyconfigures · A foreign key is a column or set of columns in a relational table whose values reference a candidate key in the same or another table, establishing a relationship and supporting referential integrity.
- MySQLcontrasts with · MySQL is an open-source relational database management system that stores, manages, and queries structured data using SQL.
- soft deletionalternative to · Soft deletion is a technique that marks or hides data as deleted while retaining its physical representation for recovery or later permanent removal.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

