Browse Source

perf(core): Fix performance when using FacetValue-based checks

Fixes #3075
Michael Bromley 1 year ago
parent
commit
a735bdf9ea
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/core/src/config/promotion/utils/facet-value-checker.ts

+ 1 - 0
packages/core/src/config/promotion/utils/facet-value-checker.ts

@@ -63,6 +63,7 @@ export class FacetValueChecker {
                 .findOne({
                 .findOne({
                     where: { id: orderLine.productVariant.id },
                     where: { id: orderLine.productVariant.id },
                     relations: ['product', 'product.facetValues', 'facetValues'],
                     relations: ['product', 'product.facetValues', 'facetValues'],
+                    loadEagerRelations: false,
                 })
                 })
                 .then(result => result ?? undefined);
                 .then(result => result ?? undefined);
             if (!variant) {
             if (!variant) {