I want to implement a sql query in the following way:
INNER JOIN `Product_has_ProductFeature` t ON `Product`.`id` = t.`productId` AND t.`productFeatureValueI
You can use the below code:
$model = Product::find() ->innerJoinWith('t', 'Product.id = T.productId') ->andWhere(['T.productFeatureValueId' => '']) ->innerJoinWith('t1', 'Product.id = T1.productId') ->andWhere(['T1.productFeatureValueId' => '5']) ->all();