Bug #26582

Repository remove() throws error even if __identity is furnished

Added by Regine Rosewich over 10 years ago. Updated about 10 years ago.

Status:
Rejected
Priority:
Must have
Category:
Persistence
Start date:
2011-05-03
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

The attempt to remove an object from the repository throws an error even if the __identity (flow3_persistence_identifier) is furnished. If the object to remove is explicitly
searched with a query before removing it, the remove() works. Maybe the object-constellation causes the error as the 'complete' object consist of an abstract-object and the real-object joined with @InheritanceType("JOINED").

The error-message is as follows:

A detached entity can not be removed. #0 /Applications/MAMP/htdocs/FLOW3/Packages/Framework/FLOW3/Resources/PHP/Doctrine/ORM/UnitOfWork.php(1264): Doctrine\ORM\UnitOfWork->doRemove(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse), Array)
#1 /Applications/MAMP/htdocs/FLOW3/Packages/Framework/FLOW3/Resources/PHP/Doctrine/ORM/EntityManager.php(472): Doctrine\ORM\UnitOfWork->remove(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse))
#2 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Persistence_Doctrine_PersistenceManager_Original.php(147): Doctrine\ORM\EntityManager->remove(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse))
#3 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Persistence_Doctrine_Repository_Original.php(100): F3\FLOW3\Persistence\Doctrine\PersistenceManager_Original->remove(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse))
#4 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_WeluPdm_Service_ExtDirect_V1_Controller_Stammdaten_KlassifizierungController_Original.php(200): F3\FLOW3\Persistence\Doctrine\Repository_Original->remove(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse))
#5 [internal function]: F3\WeluPdm\Service\ExtDirect\V1\Controller\Stammdaten\KlassifizierungController_Original->removeKlasseAction(Object(F3\WeluPdm\Domain\Model\Stammdaten\Klasse))
#6 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Controller_ActionController_Original.php(283): call_user_func_array(Array, Array)
#7 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Controller_ActionController_Original.php(183): F3\FLOW3\MVC\Controller\ActionController_Original->callActionMethod()
#8 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Dispatcher_Original.php(106): F3\FLOW3\MVC\Controller\ActionController_Original->processRequest(Object(F3\FLOW3\MVC\Web\Request), Object(F3\ExtJS\ExtDirect\TransactionResponse))
#9 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Dispatcher.php(101): F3\FLOW3\MVC\Dispatcher_Original->dispatch(Object(F3\FLOW3\MVC\Web\Request), Object(F3\ExtJS\ExtDirect\TransactionResponse))
#10 [internal function]: F3\FLOW3\MVC\Dispatcher->dispatch(Object(F3\FLOW3\MVC\Web\Request), Object(F3\ExtJS\ExtDirect\TransactionResponse))
#11 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Dispatcher.php(89): call_user_func_array(Array, Array)
#12 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AdviceChain_Original.php(74): F3\FLOW3\MVC\Dispatcher->FLOW3_AOP_Proxy_invokeJoinPoint(Object(F3\FLOW3\AOP\JoinPoint))
#13 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Security_Aspect_RequestDispatchingAspect_Original.php(131): F3\FLOW3\AOP\Advice\AdviceChain_Original->proceed(Object(F3\FLOW3\AOP\JoinPoint))
#14 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AroundAdvice_Original.php(48): F3\FLOW3\Security\Aspect\RequestDispatchingAspect_Original->setAccessDeniedResponseHeader(Object(F3\FLOW3\AOP\JoinPoint))
#15 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AdviceChain_Original.php(72): F3\FLOW3\AOP\Advice\AroundAdvice_Original->invoke(Object(F3\FLOW3\AOP\JoinPoint))
#16 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Security_Aspect_RequestDispatchingAspect_Original.php(92): F3\FLOW3\AOP\Advice\AdviceChain_Original->proceed(Object(F3\FLOW3\AOP\JoinPoint))
#17 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AroundAdvice_Original.php(48): F3\FLOW3\Security\Aspect\RequestDispatchingAspect_Original->blockIllegalRequestsAndForwardToAuthenticationEntryPoints(Object(F3\FLOW3\AOP\JoinPoint))
#18 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AdviceChain_Original.php(72): F3\FLOW3\AOP\Advice\AroundAdvice_Original->invoke(Object(F3\FLOW3\AOP\JoinPoint))
#19 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_Security_Aspect_RequestDispatchingAspect_Original.php(75): F3\FLOW3\AOP\Advice\AdviceChain_Original->proceed(Object(F3\FLOW3\AOP\JoinPoint))
#20 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AroundAdvice_Original.php(48): F3\FLOW3\Security\Aspect\RequestDispatchingAspect_Original->initializeSecurity(Object(F3\FLOW3\AOP\JoinPoint))
#21 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_AOP_Advice_AdviceChain_Original.php(72): F3\FLOW3\AOP\Advice\AroundAdvice_Original->invoke(Object(F3\FLOW3\AOP\JoinPoint))
#22 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_FLOW3_MVC_Dispatcher.php(115): F3\FLOW3\AOP\Advice\AdviceChain_Original->proceed(Object(F3\FLOW3\AOP\JoinPoint))
#23 /Applications/MAMP/htdocs/FLOW3/Data/Temporary/Development/Cache/Code/FLOW3_Object_Classes/F3_ExtJS_ExtDirect_RequestHandler_Original.php(115): F3\FLOW3\MVC\Dispatcher->dispatch(Object(F3\FLOW3\MVC\Web\Request), Object(F3\ExtJS\ExtDirect\TransactionResponse))
#24 /Applications/MAMP/htdocs/FLOW3/Packages/Framework/FLOW3/Classes/Core/Bootstrap.php(320): F3\ExtJS\ExtDirect\RequestHandler_Original->handleRequest()
#25 /Applications/MAMP/htdocs/FLOW3/Packages/Framework/FLOW3/Classes/Core/Bootstrap.php(174): F3\FLOW3\Core\Bootstrap->handleWebRequest()
#26 /Applications/MAMP/htdocs/FLOW3/Web/index.php(38): F3\FLOW3\Core\Bootstrap->run()
#27 {main}

Also available in: Atom PDF