[DDC-954] Look into deferring foreign key checks until flush finished Created: 28/Dec/10  Updated: 23/May/12  Resolved: 23/May/12

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: None
Fix Version/s: 2.3
Security Level: All

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Dependency
is required for DDC-959 Problem deleting when the foreign ke... Resolved
Sub-Tasks:
Key
Summary
Type
Status
Assignee
DDC-890 Association mapping 'One-To-Many, Sel... Sub-task Resolved Guilherme Blanco  
DDC-369 Bulk-Delete on Self-Referencing CTI f... Sub-task Resolved Guilherme Blanco  

 Description   

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?



 Comments   
Comment by Benjamin Eberlei [ 29/Dec/10 ]

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).

Comment by Guilherme Blanco [ 23/May/12 ]

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.

Generated at Wed Jul 23 14:20:56 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.