Sfoglia il codice sorgente

Refactoring repositoryQuery id d'entité

packProduct
Fabien Normand 3 anni fa
parent
commit
7148f7ebf5
1 ha cambiato i file con 11 aggiunte e 9 eliminazioni
  1. +11
    -9
      Repository/Reduction/ReductionCatalogRepositoryQuery.php

+ 11
- 9
Repository/Reduction/ReductionCatalogRepositoryQuery.php Vedi File

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


Loading…
Annulla
Salva