diff --git a/src/Celsius3/CoreBundle/Manager/UnionManager.php b/src/Celsius3/CoreBundle/Manager/UnionManager.php index 1e2aa9d21..9881d410e 100644 --- a/src/Celsius3/CoreBundle/Manager/UnionManager.php +++ b/src/Celsius3/CoreBundle/Manager/UnionManager.php @@ -69,6 +69,9 @@ class UnionManager 'Celsius3CoreBundle:CatalogPosition' => array( 'catalog', ), + 'Celsius3CoreBundle:CatalogResult' => array( + 'catalog' + ) ), 'Celsius3CoreBundle:Journal' => array( 'Celsius3CoreBundle:JournalType' => array( @@ -120,6 +123,8 @@ public function __construct(EntityManager $em, InstanceManager $instance_manager public function union($name, $main, array $elements, $updateInstance) { + $this->em->getFilters()->disable('softdeleteable'); + if (array_key_exists($name, $this->references)) { foreach ($this->references[$name] as $key => $reference) { foreach ($reference as $field) { @@ -128,6 +133,8 @@ public function union($name, $main, array $elements, $updateInstance) } } + $this->em->getFilters()->enable('softdeleteable'); + $this->em->getRepository($name)->deleteUnitedEntities($elements); if ($updateInstance) {