mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-369: Bulk-Delete on Self-Referencing CTI fails with FK Error #460
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 24, 2010).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user @beberlei:
fails with:
fixture is:
@doctrinebot commented on GitHub (Feb 24, 2010):
Comment created by romanb:
That should rather be ->executeUpdate() instead of ->getResult() but thats surely not the problem here.
@doctrinebot commented on GitHub (Feb 24, 2010):
Comment created by romanb:
An option is to check all associations and if there is a self-referential one execute UPDATE statements to set the FKs to null.
However, this is a bit of extra work and I dont consider this scenario extremely common together with the combination of bulk deletes.
Pushing priority down for now.
@doctrinebot commented on GitHub (May 23, 2012):
Comment created by @guilhermeblanco:
Added coverage to this specific situation. All passing.
Closing the ticket as fixed for 2.3.
3e601c3a53@doctrinebot commented on GitHub (May 23, 2012):
Issue was closed with resolution "Fixed"