ActiveDataProvider implements a data provider based on yii\db\Query and yii\db\ActiveQuery.
However the parameter $query implements only the QueryInterface and not the ActiveQueryInterface which is kind of strange for ActiveDataProvider!.. Is there any way to do queries with relations like this?
provider = new ActiveDataProvider([
'query' => MainModel::find()
->with("relatedModel")
->where(["relatedModel.something"=>$value]),
]);