title: In yii2 How do we call through relations
body: <p>For example there are A, B, C, D, E, F tables.</p>
  
  <p>A has a_id as foreign key in B.
  B has a_id and c_id as foreign key.
  C has d_id as foreign key.
  D has e_id as foreign key.</p>
  
  <p>Now how do I write a relation from A to D. As A has no direct relation to D.</p>
  
  <p>From A to C I write the relation as below.</p>
  
  <pre><code>    public function C
  {
     return $this-&gt;hasMany(C::className(), ['c_id' =&gt; 'c_id'])
              -&gt;via('B');
  }
  </code></pre>
  
  <p>How do i get through relations from A to D?? I cannot find the syntax anywhere online.. 
  Thanks..</p>