DDC-954: Look into deferring foreign key checks until flush finished #1190

Closed
opened 2026-01-22 13:05:28 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 28, 2010).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @beberlei:

There are several timing issues that will be complicated to fix which relate to foreign key checks.

If we could optionally allow people to defer the foreign key checks until flush has fully completed we could simply solve them all, maybe even across all vendors?

Originally created by @doctrinebot on GitHub (Dec 28, 2010). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @beberlei: There are several timing issues that will be complicated to fix which relate to foreign key checks. If we could optionally allow people to defer the foreign key checks until flush has fully completed we could simply solve them all, maybe even across all vendors?
admin added the Improvement label 2026-01-22 13:05:28 +01:00
admin closed this issue 2026-01-22 13:05:29 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 28, 2010):

@doctrinebot commented on GitHub (Dec 28, 2010): - is required for [DDC-959: Problem deleting when the foreign key is the primary key of the table](http://www.doctrine-project.org/jira/browse/DDC-959)
Author
Owner

@doctrinebot commented on GitHub (Dec 29, 2010):

Comment created by @beberlei:

Postgresql: http://stackoverflow.com/questions/139884/how-do-i-disable-referential-integrity-in-postgres-8-2
Mysql: http://cristian-radulescu.ro/article/disable-foreign-key-checks-in-mysql.html
Oracle: http://infolab.stanford.edu/~ullman/fcdb/oracle/or-triggers.html#deferring%20constraint%20checking
Mssql: No clue?!
Sqlite: no foreign key support (yet)
DB2: not researched (IBM should provide better DB2 support for PHP first).

@doctrinebot commented on GitHub (Dec 29, 2010): Comment created by @beberlei: Postgresql: http://stackoverflow.com/questions/139884/how-do-i-disable-referential-integrity-in-postgres-8-2 Mysql: http://cristian-radulescu.ro/article/disable-foreign-key-checks-in-mysql.html Oracle: http://infolab.stanford.edu/~ullman/fcdb/oracle/or-triggers.html#deferring%20constraint%20checking Mssql: No clue?! Sqlite: no foreign key support (yet) DB2: not researched (IBM should provide better DB2 support for PHP first).
Author
Owner

@doctrinebot commented on GitHub (May 23, 2012):

Comment created by @guilhermeblanco:

As per 3e601c3a53 all tests related to this issue are closed.
Marking this ticket as fixed on 2.3.

@doctrinebot commented on GitHub (May 23, 2012): Comment created by @guilhermeblanco: As per https://github.com/doctrine/doctrine2/commit/3e601c3a53226ce981fe82db164f297a8d605ae7 all tests related to this issue are closed. Marking this ticket as fixed on 2.3.
Author
Owner

@doctrinebot commented on GitHub (May 23, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (May 23, 2012): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1190