diff --git a/src/datasources/category-api.ts b/src/datasources/category-api.ts index b8b8f6b..8df7efc 100644 --- a/src/datasources/category-api.ts +++ b/src/datasources/category-api.ts @@ -113,7 +113,7 @@ WHERE product_category.product_id = ? Scopes.LOCALES_READ, ]); const res = await this.cachedRaw( - `SELECT id, json_object_agg(locale, name) as locale_names FROM v_esales_categorytree_i18n WHERE id IN (${createQuestionMarksFromList( + `SELECT id, json_object_agg(locale, name) as locale_names FROM v_esales_categorytree_i18n_unmaterialized WHERE id IN (${createQuestionMarksFromList( ids, )}) GROUP BY id`, ids, @@ -145,7 +145,7 @@ WHERE product_category.product_id = ? Scopes.CATEGORIES_PUBLIC_READ, ]); const res = await this.cachedRaw( - `SELECT ec.id, ec.locale, getSafeXmlPath(ec.path, 2) as path, ec.name FROM v_esales_categorytree_i18n ec WHERE ec.id IN (${createQuestionMarksFromList( + `SELECT ec.id, ec.locale, getSafeXmlPath(ec.path, 2) as path, ec.name FROM v_esales_categorytree_i18n_unmaterialized ec WHERE ec.id IN (${createQuestionMarksFromList( ids, )})`, ids,