title: Yii2 ActiveDataProvider query by ActiveQueryInterface ( querying with relations)
body: <p>ActiveDataProvider implements a data provider based on yii\db\Query and yii\db\ActiveQuery. </p>
  
  <p>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?</p>
  
  <pre><code>provider = new ActiveDataProvider([
      'query' =&gt; MainModel::find()
                -&gt;with("relatedModel")
                -&gt;where(["relatedModel.something"=&gt;$value]),
  ]);
  </code></pre>