I get review information from the review_detail
table and get rating information from rating_opetion_vote
Separately but I try to join these two tables and return collection but it is not working.
I try to Join both tables using the Join query as per the following.
protected $_productsreviewFactory;
public function __construct(
Magento\Review\Model\ResourceModel\Review\Product\CollectionFactory $productsreviewFactory)
{
$this->_productsreviewFactory = $productsreviewFactory;
}
$collection = $this->_productsreviewFactory->create();
$collection->getSelect()
->join(
['rating_option_vote'],
'review_detail.review_id = rating_option_vote.review_id',
[]
);
return $collection->getData();