Top "Cascade" questions

Cascade refers to a table-definition keyword in relational databases; it instructs the query engine to take a certain action (delete, update), when a primary key is modified, on tables linked by a foreign key.

What is the meaning of the CascadeType.ALL for a @ManyToOne JPA association

I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship. The case: public class User { @…

java jpa one-to-many cascade many-to-one
SQL ON DELETE CASCADE, Which Way Does the Deletion Occur?

If I have two relations in a database, like this: CREATE TABLE Courses ( CourseID int NOT NULL PRIMARY KEY, Course …

sql database database-design cascade relation
How does JPA orphanRemoval=true differ from the ON DELETE CASCADE DML clause

I am a little confused about the JPA 2.0 orphanRemoval attribute. I think I can see it is needed when I …

hibernate jpa cascade cascading-deletes orphan-removal
How to add "on delete cascade" constraints?

In PostgreSQL 8 is it possible to add ON DELETE CASCADES to the both foreign keys in the following table without …

postgresql constraints cascade cascading-deletes postgresql-8.4
PostgreSQL: FOREIGN KEY/ON DELETE CASCADE

I have two tables like here: DROP TABLE IF EXISTS schemas.book; DROP TABLE IF EXISTS schemas.category; DROP SCHEMA …

sql postgresql cascade
When/Why to use Cascading in SQL Server?

When setting up foreign keys in SQL Server, under what circumstances should you have it cascade on delete or update, …

sql-server database-design foreign-keys rdbms cascade
Hibernate: OneToMany save children by cascade

In the class Parent there is a list List. When the parent is saved the children which have been added …

hibernate one-to-many cascade hibernate-annotations
SQL Server: drop table cascade equivalent?

In oracle, to drop all tables and constraints you would type something like DROP TABLE myTable CASCADE CONSTRAINTS PURGE; and …

sql sql-server cascade database-table sql-drop
Hibernate: How to use cascade in annotation?

How can I use cascade and annotations in hibernate? But I stay with a doubt: I have this situation: public …

java hibernate cascade
JPA Hibernate many-to-many cascading

I am using JPA 2.0 and hibernate. I have a User class and a Group class as follows: public class User …

hibernate jpa many-to-many jpa-2.0 cascade