|
|
@@ -25,6 +25,15 @@ class ProductFamilyRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
parent::__construct($repository, 'productFamily', $paginator); |
|
|
|
} |
|
|
|
|
|
|
|
public function resetRelationsJoin(): void |
|
|
|
{ |
|
|
|
$this->isJoinSections = false; |
|
|
|
$this->isJoinProductCategories = false; |
|
|
|
$this->isJoinProductFamilySectionProperties = false; |
|
|
|
$this->isJoinProducts = false; |
|
|
|
$this->isJoinQualityLabels = false; |
|
|
|
} |
|
|
|
|
|
|
|
public function joinProductFamilySectionProperties(bool $addSelect = true): self |
|
|
|
{ |
|
|
|
if (!$this->isJoinProductFamilySectionProperties) { |
|
|
@@ -178,7 +187,8 @@ class ProductFamilyRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
|
|
|
|
$this->innerJoin('.products', 'products'); |
|
|
|
if ($addSelect) { |
|
|
|
$this->addSelect('products'); |
|
|
|
// Décommenté sinon doctrine n'hydrate pas correctement les produits liés au ProductFamily (exemple : un seul sur deux) |
|
|
|
// $this->addSelect('products'); |
|
|
|
} |
|
|
|
} |
|
|
|
return $this; |