浏览文章
文章信息
Magento2 joinTable 使用|链表查询
14716
代码示例
$product_collection->joinTable( ['review'=>'review'], 'entity_pk_value=entity_id', ['review_id'=>'review_id','status_id'=>'status_id',], 'review.entity_pk_value=e.entity_id', 'left' )->joinTable( ['review_summary'=>'review_entity_summary'], 'entity_pk_value=entity_id', ['reviews_summary'=>'review_summary.rating_summary','reviews_count'=>'review_summary.reviews_count',], 'review_summary.entity_pk_value=e.entity_id', 'left' );