DDC-2524: Wrong commit order with cascade remove and double association #3166

Open
opened 2026-01-22 14:14:15 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 24, 2013).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user mnapoli:

We have stumbled upon a bug in a situation where a class A has the following associations to a class B:

  • A has one B (oneToOne unidirectional)
  • A has many B (oneToMany bidirectional)

Associations are with cascade remove.

We will submit a PR soon with a failing test case.

The failure is a MySQL foreign key violation exception when removing A (removals for B are executed after removals for A).

Originally created by @doctrinebot on GitHub (Jun 24, 2013). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user mnapoli: We have stumbled upon a bug in a situation where a class A has the following associations to a class B: - A has one B (oneToOne unidirectional) - A has many B (oneToMany bidirectional) Associations are with cascade remove. We will submit a PR soon with a failing test case. The failure is a MySQL foreign key violation exception when removing A (removals for B are executed **after** removals for A).
admin added the Bug label 2026-01-22 14:14:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3166