Explorar o código

fix(core): 'productVariantId' in group statement is ambiguous (#1793)

William Pain %!s(int64=3) %!d(string=hai) anos
pai
achega
3c6336470a

+ 1 - 1
packages/core/src/plugin/default-search-plugin/search-strategy/mysql-search-strategy.ts

@@ -46,7 +46,7 @@ export class MysqlSearchStrategy implements SearchStrategy {
 
 
         this.applyTermAndFilters(ctx, facetValuesQb, { ...input, groupByProduct: true });
         this.applyTermAndFilters(ctx, facetValuesQb, { ...input, groupByProduct: true });
         if (!input.groupByProduct) {
         if (!input.groupByProduct) {
-            facetValuesQb.groupBy('productVariantId');
+            facetValuesQb.groupBy('si.productVariantId');
         }
         }
         if (enabledOnly) {
         if (enabledOnly) {
             facetValuesQb.andWhere('si.enabled = :enabled', { enabled: true });
             facetValuesQb.andWhere('si.enabled = :enabled', { enabled: true });