Answer the question
In order to leave comments, you need to log in
How to select records from MongoDB in Yii2?
Actually, I understand how to select records in monge
db.getCollection('params').find({params: {$elemMatch : {scheduler_settings:{$ne:[]}}}})
Params::find()->where([
'params' => [
'$elemMatch' => [
'scheduler_settings' => '{$ne:[]}'
]
]
])->all();
Params::findAll('{params: {$elemMatch : {scheduler_settings:{$exists:true}}}}');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question