Преглед на файлове

Test pour réduction requete #624

develop
Fabien Normand преди 2 години
родител
ревизия
a5f5b4fd08
променени са 2 файла, в които са добавени 9 реда и са изтрити 0 реда
  1. +2
    -0
      Repository/Product/ProductCategoryRepositoryQuery.php
  2. +7
    -0
      Repository/Product/ProductFamilyStore.php

+ 2
- 0
Repository/Product/ProductCategoryRepositoryQuery.php Целия файл

@@ -26,6 +26,8 @@ class ProductCategoryRepositoryQuery extends AbstractRepositoryQuery

return $this
->innerJoin('.productFamilies', 'productFamilies');
//@GONE AWAY avec un addSelect('productFamilies') on gagne 10 requetes

}

return $this;

+ 7
- 0
Repository/Product/ProductFamilyStore.php Целия файл

@@ -65,6 +65,13 @@ class ProductFamilyStore extends AbstractStore
$productFamiliesArray = [];

foreach ($parentCategory->getChildrens() as $i => $category) {
//Essai d'alternative
// foreach ($category->getProductFamilies() as $productFamily) {
// if($productFamily->getStatus()==1) {
// $productFamiliesArray[$productFamily->getId()] = $productFamily;
// }
// }

$productFamiliesCategory = $this->getByCategory($category);
foreach ($productFamiliesCategory as $productFamily) {
$productFamiliesArray[$productFamily->getId()] = $productFamily;

Loading…
Отказ
Запис