title: yii2 hasOne relation work wrong
body: <p>I have 2 tables : users and favorite the following :</p>
  
  <p><a href="https://i.stack.imgur.com/xObnx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xObnx.png" alt="users table"></a></p>
  
  <p><a href="https://i.stack.imgur.com/yLYEn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yLYEn.png" alt="favorite"></a></p>
  
  <p>now I establish a relation between them like the following in Favorite model</p>
  
  <pre><code>public function getUser()
  {
      return $this-&gt;hasOne(User::className(), ['id', 'user_favorited']);
  }
  </code></pre>
  
  <p>in Controller I find a list of user's favorites </p>
  
  <pre><code>public function actionGetList()
  {
      $favorite = Favorite::find()-&gt;where([
                'user_favoriting' =&gt; Yii::$app-&gt;user-&gt;id
            ])-&gt;all();
      foreach ($favorite as $key =&gt; $item) {
          # code...
          echo "&lt;pre&gt;"; var_dump($item-&gt;user); echo "&lt;br/&gt;"; die('123');
      }
      return $favorite;
  }
  </code></pre>
  
  <p>But when I make a request to this action I get an error </p>
  
  <pre><code>Column not found: 1054 Unknown column '0' in 'where clause'\nThe SQL being executed was: SELECT * FROM `users` WHERE (`0`, `1`) IN ((12, 80))",
  </code></pre>
  
  <p>Please help me!</p>