title: CakePHP 3: Display data from join table used in custom finder
body: <pre><code>CakePHP Version: 3.1.4
  </code></pre>
  
  <p>I have a custom finder in a model <em>Paintings</em> where I join with another table <em>Artists</em> and select fields from both to display in a view later:
  (They have the relation: <em>Paintings belongsTo Artists</em>)</p>
  
  <pre class="lang-php prettyprint-override"><code>class PaintingsTable extends Table
  {
   // top five pics
   public function findTopfive(Query $query, array $options){
  
      $query
      -&gt;join([
          'artists' =&gt;[
              'table' =&gt; 'artists',
              'type' =&gt; 'INNER',
              'conditions' =&gt; 'Paintings.artist_id = Artists.id'
          ]
      ])
      -&gt;select(['Paintings.id', 'Paintings.title', 'Paintings.ticket_count', 'Artists.name'])
      -&gt;where(['ticket_count &gt;=' =&gt; 1])
      -&gt;order(['ticket_count' =&gt; 'DESC'])
      -&gt;limit(5);
  
      return $query;
  }
  </code></pre>
  
  <p>Then I use the finder in a Controller:</p>
  
  <pre class="lang-php prettyprint-override"><code>class CashpositionsController extends AppController
  {
      public function overview()
      {
          // TOP 5 paintings:
          $paintings = TableRegistry::get('Paintings');
          $top_paintings = $paintings-&gt;find('topfive');
      }
  }
  </code></pre>
  
  <p>I can display the data from the paintings just like this:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php foreach ($top_paintings as $paintings): ?&gt;
     &lt;tr&gt;
         &lt;td&gt;&lt;?= h($paintings-&gt;id); ?&gt; &lt;/td&gt;
         &lt;td&gt;&lt;?= h($paintings-&gt;ticket_count); ?&gt; &lt;/td&gt;
         &lt;td&gt; &lt;!-- here should be paintings-&gt;artist-&gt;name --&gt; &lt;/td&gt;
    &lt;/tr&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p><strong>But how do I display the Artist.name here that comes from the joined table?</strong></p>
  
  <p>The data is fetched from the query like this:</p>
  
  <pre><code>-&gt;top_paintings(array)
    -&gt; 0(object)
       id 9
       title nicepic
       ticket_count 4
       artist_id 80
       -&gt; Artists(array)
           name MrArtist
    -&gt; 1(object)
  </code></pre>
  
  <p>So the data is there but I just cannot get it to display. I tried various approaches with syntax I successfully used in other files but this one I can't figure out. I could not find an example on this in the Cookbook either, but maybe I searched the wrong place.</p>
  
  <p><strong>What would be the correct syntax do to this?</strong></p>