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.

Cascade Delete Rule in EF 4.1 Code First when using Shared Primary Key Association

I implemented a bidirectional 1:1 relationship based on this answer: Primary /Foreign Key in Entity Framework I define the bidirectional relation …

ef-code-first sql-server-ce entity-framework-4.1 cascade cascading-deletes
What is the problem with foreign key cascade multiple paths and cycles?

In SQL Server 2005 I just struck the infamous error message: Introducing FOREIGN KEY constraint XXX on table YYY may cause …

sql foreign-keys cascade rdbms-agnostic
Can't get hibernate to delete children instances via cascade, that were removed from a one-to-many relation

slight problem here: I have two entity classes, let's say class Parent { Set<Child> children; } class Child { SomethingElse …

java hibernate one-to-many cascade all-delete-orphan
CASCADE DELETE on two foreign key constraints

I have the following example: Table A -some_id Table B -another_id Table C -some_id_fk -another_id_…

sql database postgresql database-design cascade
Entity Framework Code first - FOREIGN KEY constraint problem

I'm new to EF code first principal and currently with no clue what to do.. I have 2 POCO classes.. public …

entity-framework foreign-keys ef-code-first cascade
ALTER TABLE to add ON DELETE CASCADE statement

I want to do the following in PostgreSQL (using Hibernate): ALTER TABLE fruits ADD CONSTRAINTS id ON DELETE CASCADE; Obviously, …

hibernate postgresql cascade cascading-deletes postgresql-9.0
FOREIGN KEY references same table's column. Can't insert values

I created table with FOREIGN KEY and can't insert anything. CREATE TABLE menus ( id int(10), parent_id int(10), label varchar(255), …

mysql foreign-keys cascade
Hibernate 3 On delete cascade

I have a many-to-one mapping on bookings. A booking must belong to a room. And a room can have several …

java hibernate orm annotations cascade
Hibernate : CascadeType.PERSIST does not work but CascadeType.ALL to save object

@Entity @Table(name = "Section_INST") public class Section { @javax.persistence.Id @GeneratedValue(strategy = GenerationType.SEQUENCE,generator = "Section_ID_GENERATOR") @SequenceGenerator(…

hibernate cascade
Disable Cascade in ManyToOne relationship JPA when saving

I'm having problems when saving entities in my DB. I have something like (very simplified) : @Entity public class Building { @OneToMany(…

java jpa eclipselink cascade many-to-one