How to use "with" active query?
Closed this issue · 2 comments
onskyD commented
eg:
SELECT * FROM post_lang
WHERE (language
='ru') AND post_id IN (1,2,3)
shoxabbos commented
Very many queries to the database. How to fix it ?
OmgDef commented
Product::find()->localized()->all()
Generates this
SELECT * FROM `product_translation` WHERE (`language`='ru') AND (`owner_id` IN (5923, 5922, 5916, 5932))