Top "Cascading-deletes" questions

The concept of SQL databases deleting rows that refer (via a foreign key) to a deleted row.

How do I use cascade delete with SQL Server?

I have 2 tables: T1 and T2, they are existing tables with data. We have a one to many relationship between …

sql-server cascading-deletes
On delete cascade with doctrine2

I'm trying to make a simple example in order to learn how to delete a row from a parent table …

php doctrine-orm symfony cascading-deletes
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
Delete rows with foreign key in PostgreSQL

I would like to delete rows which contain a foreign key, but when I try something like this: DELETE FROM …

sql postgresql foreign-keys cascading-deletes
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
Entity Framework (EF) Code First Cascade Delete for One-to-Zero-or-One relationship

Following the "Code First Modeling" section of the Pluralsight "Getting Started with Entity Framework 5" course by Julie Lerman, I created …

c# entity-framework ef-code-first entity-framework-5 cascading-deletes
Is it possible to delete from multiple tables in the same SQL statement?

It's possible to delete using join statements to qualify the set to be deleted, such as the following: DELETE J …

sql sql-server delete-row cascading-deletes
What is the difference between CascadeType.REMOVE and orphanRemoval in JPA?

What's the difference between @OneToMany(cascade=REMOVE, mappedBy="customer") public List<Order> getOrders() { ... } and @OneToMany(mappedBy="customer", orphanRemoval="…

java hibernate jpa cascading-deletes orphan-removal
Entity Framework on delete cascade

I have problem with deleting related rows in Entity Framework 4.1. I have tables with relations Book 1<--->* BookFormats …

c# entity-framework foreign-keys cascading-deletes
JPA/Hibernate remove entity sometimes not working

I have the following code that usually works well: public void delete(T object) { EntityManager em = getPersistence().createEntityManager(); EntityTransaction et = …

hibernate jpa cascading-deletes