mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1391: new class mapped by self but cannot flush #1739
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 (Sep 23, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user icefish:
We create an entity class ,but it has an column mapped by this class
ex:
$user= new User();
$user->setParent($user);
but can not to flush;
Have any method to Solve it?
@doctrinebot commented on GitHub (Sep 25, 2011):
Comment created by @beberlei:
Its not a bug, this dependency graph cannot be solved during flush. You have to do two transactions.
This is not a limitation of Doctrine, if you have a table "foo [id, parent_id]" and try to insert a new row that points to itself then this would only be possible with 3 sql statements, INSERT .., SELECT LAST_INSERT_ID(), UPDATE ...
@doctrinebot commented on GitHub (Sep 25, 2011):
Issue was closed with resolution "Invalid"