Skip to content

Commit

Permalink
Se corrige error en la union de catálogos
Browse files Browse the repository at this point in the history
  • Loading branch information
jogianotti committed Feb 21, 2019
1 parent 17c95c9 commit 5b0d355
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Celsius3/CoreBundle/Manager/UnionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class UnionManager
'Celsius3CoreBundle:CatalogPosition' => array(
'catalog',
),
'Celsius3CoreBundle:CatalogResult' => array(
'catalog'
)
),
'Celsius3CoreBundle:Journal' => array(
'Celsius3CoreBundle:JournalType' => array(
Expand Down Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 5b0d355

Please sign in to comment.