mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1128: Entity not being deleted on @ManyToOne - no errors whatsoever. #1410
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 (Apr 27, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user nriesco:
If I try to delete an entity that has @ManyToOne relationships, nothing happens, not even a constraint error.
In fact this DQL works perfectly fine:
The code:
@doctrinebot commented on GitHub (Apr 30, 2011):
Comment created by @beberlei:
Fixed formatting, schedule for 2.0.5
@doctrinebot commented on GitHub (May 1, 2011):
Comment created by @beberlei:
I cannot reproduce this, can you upload an xdebug function trace starting before $em->remove() and stopping after $em->flush() ?
@doctrinebot commented on GitHub (May 3, 2011):
Comment created by nriesco:
error1.log.xt is the xdebug function trace.
error2.log.xt is the same but with a lot more information (xdebug.collect_return=On)
@doctrinebot commented on GitHub (May 14, 2011):
Comment created by @beberlei:
The entity is not managed, are you fetching it from the session? It has to be managed, call $entity = $em->merge($entity); before calling $em->remove($entity);
@doctrinebot commented on GitHub (May 14, 2011):
Issue was closed with resolution "Invalid"