[DDC-2267] EntityManager throws an exception when trying to flush($entity) on a deleted entity Created: 31/Jan/13  Updated: 04/May/13  Resolved: 04/May/13

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

Type: Bug Priority: Major
Reporter: Gennady Feldman Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by DDC-2309 Invalid behaviour to flush only one e... Resolved

 Description   

$entity = $em->find("Bug", 1);
$em->remove($entity);
$em->flush($entity);

Throws an exception. Works fine with $em->flush() (No $entity provided).

Would be nice to just flush the deleted entity separate from other entities. This technically works for other operations except remove(). The exception claims that the entity is not mapped. It technically can't be mapped since it's set to be deleted.



 Comments   
Comment by Benjamin Eberlei [ 04/May/13 ]

Fixed in 2.3 branch, for 2.3.4

Generated at Sat Nov 29 03:53:31 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.