title: Cakephp. How do i access other columns of a table if the only referenced column of that table is the id column
body: <p>i have TableA referencing id column of TableB as foreign key. The code below outputs the id of TableB, so i want to use this id to access the rest of the columns of this entity. How do i do that?</p>
  
  <p><strong>Thi is the index.ctp  below</strong> </p>
  
  <pre><code>&lt;td&gt;&lt;?= $tableA-&gt;has('tableB') ? $this-&gt;Html-&gt;link($tableA-&gt;$tableb_id-&gt;, ['controller' =&gt; 'TableA', 'action' =&gt; 'view', $tableA-&gt;TableB-&gt;id]) : '' ?&gt;&lt;/td&gt;
  </code></pre>