Model/ResourceModel/Review.php
public function getVoteCollectionByReview($reviewId)
    {
        $votesCollection = $this->voteCollection->create()
            ->setReviewFilter($reviewId);

        $votesCollection->getSelect()->join(
            ['rating' => $this->getTable('rating')],
            'rating.rating_id = main_table.rating_id',
            ['rating_code' => 'rating.rating_code']
        );

        return $votesCollection;
    }
public function getVoteCollectionByReview($reviewId)
    {
        $votesCollection = $this->voteCollection->create()
            ->setReviewFilter($reviewId);

        $votesCollection->getSelect()->join(
            ['rating' => $this->getTable('rating')],
            'rating.rating_id = main_table.rating_id',
            ['rating_code' => 'rating.rating_code']
        );

        return $votesCollection;
    }
public function getVoteCollectionByReview ( $ reviewId ) { $ votesCollection = $ this -> voteCollection -> create ( ) -> setReviewFilter ( $ reviewId ) ; $ votesCollection -> getSelect ( ) -> join ( [ 'rating' => $ this -> getTable ( 'rating' ) ] , 'rating.rating_id = main_table.rating_id' , [ 'rating_code' => 'rating.rating_code' ] ) ; return $ votesCollection ; }
Get vote collection by review.

@param int $reviewId

@return mixed
Get vote collection by review .