Magento2-调试SQL错误

Magento2-调试SQL错误,magento2,Magento2,我会犯这样的错误 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in 'field list', query was: SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_in

我会犯这样的错误

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.name' in 'field list', query was: SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `cat_index`.`position` AS `cat_index_position`, `e`.`name`, `e`.`image`, `e`.`small_image`, `e`.`thumbnail`, `e`.`name`, `e`.`short_description`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`image`, `e`.`small_image`, `e`.`thumbnail`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`url_key`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`swatch_image`, `e`.`tax_class_id`, `e`.`cross_tier_id`, `e`.`cross_tier_id_value`, `e`.`open_amount_max`, `e`.`open_amount_min`, `e`.`package_size`, `e`.`sw_featured`, SUM(soi.qty_ordered) AS `ordered_qty`, `order`.`state`, `stock_status_index`.`stock_status` AS `is_salable` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
 INNER JOIN `catalog_category_product_index_store1` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id=2
 LEFT JOIN `sales_order_item` AS `soi` ON soi.product_id = e.entity_id
 INNER JOIN `sales_order` AS `order` ON order.entity_id = soi.order_id
 LEFT JOIN `cataloginventory_stock_status` AS `stock_status_index` ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (order.state <> 'canceled' and soi.parent_item_id IS NULL AND soi.product_id IS NOT NULL) GROUP BY `soi`.`product_id` ORDER BY `ordered_qty` DESC
 LIMIT 8 
在magento日志中,我看不到导致此错误的类的信息。
如何找出负责此查询的类/模块?

您可以运行bin/magento dev:query log:enable 查看所有sql查询的步骤