Explorar el Código

Refactoring repositoryQuery id d'entité

packProduct
Fabien Normand hace 3 años
padre
commit
7148f7ebf5
Se han modificado 1 ficheros con 11 adiciones y 9 borrados
  1. +11
    -9
      Repository/Reduction/ReductionCatalogRepositoryQuery.php

+ 11
- 9
Repository/Reduction/ReductionCatalogRepositoryQuery.php Ver fichero

@@ -42,8 +42,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
$this->isJoinGroupUsers = true;

return $this
->leftJoin('.groupUsers', 'pf_groupusers')
->addSelect('pf_groupusers') ;
->leftJoin('.groupUsers', 'groupUsers')
->addSelect('groupUsers') ;
}
return $this;
}
@@ -54,8 +54,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
$this->isJoinProductFamilies = true;

return $this
->leftJoin('.productFamilies', 'pfs')
->addSelect('pfs') ;
->leftJoin('.productFamilies', 'productFamilies')
->addSelect('productFamilies') ;
}
return $this;
}
@@ -66,9 +66,10 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
$this->isJoinProductFamily = true;

return $this
->leftJoin('.productFamily', 'pf')
->addSelect('pf') ;
->leftJoin('.productFamily', 'productFamily')
->addSelect('productFamily') ;
}

return $this;
}

@@ -78,9 +79,10 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
$this->isJoinProductCategories = true;

return $this
->leftJoin('.productCategories', 'pcs')
->addSelect('pcs') ;
->leftJoin('.productCategories', 'productCategories')
->addSelect('productCategories') ;
}

return $this;
}

@@ -140,7 +142,7 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
$this->joinProductFamily();

return $this
->andWhere(':productFamily MEMBER OF .productFamilies OR .productFamilies is empty')
->andWhere(':productFamily MEMBER OF .productFamily OR .productFamily is empty')
->setParameter('productFamily', $productFamily);
}


Cargando…
Cancelar
Guardar