Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

商品一覧の GROUP BY で不要なキーを対象としている #1838

Closed
nanasess opened this issue Oct 14, 2016 · 0 comments
Closed

商品一覧の GROUP BY で不要なキーを対象としている #1838

nanasess opened this issue Oct 14, 2016 · 0 comments
Labels
Milestone

Comments

@nanasess
Copy link
Contributor

関連 #1805

GROUP BY product_id のみで良い

--- a/src/Eccube/Repository/ProductRepository.php
+++ b/src/Eccube/Repository/ProductRepository.php
@@ -109,7 +109,7 @@ class ProductRepository extends EntityRepository
             //@see http://doctrine-orm.readthedocs.org/en/latest/reference/dql-doctrine-query-language.html
             $qb->addSelect('MIN(pc.price02) as HIDDEN price02_min');
             $qb->innerJoin('p.ProductClasses', 'pc');
-            $qb->groupBy('p');
+            $qb->groupBy('p.id');
             $qb->orderBy('price02_min', 'ASC');
             // 新着順
         } else if (!empty($searchData['orderby']) && $searchData['orderby']->getId() == '2') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants