Ver código fonte

Refactoring repositoryQuery id d'entité

packProduct
Fabien Normand 3 anos atrás
pai
commit
7148f7ebf5
1 arquivos alterados com 11 adições e 9 exclusões
  1. +11
    -9
      Repository/Reduction/ReductionCatalogRepositoryQuery.php

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

@@ -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);
}


Carregando…
Cancelar
Salvar