title: Cake php table join two fields
body: <p>I'm starting with php using Cakephp 4.x.</p>
  <p>I baked a table called <code>Persona</code> (spanish for person), with two fields, <code>last_names</code> and <code>names</code>.</p>
  <p>I set the <code>setDisplayField</code> in my <code>PersonaTable</code> to <code>last_names</code> but I want to join it with <code>names</code>, so the output would be:</p>
  <pre><code>Doe, John
  </code></pre>
  <p>The relevant code:</p>
  <pre class="lang-php prettyprint-override"><code>public function initialize(array $config): void
  {
      parent::initialize($config);
  
      $this-&gt;setTable('personas');
      
      /* 
       * here I want to join last_names with names
       */
      $this-&gt;setDisplayField('last_names');
      $this-&gt;setPrimaryKey('id');
  }
  </code></pre>
  <p>My guess is that I have to create a function in my <code>PersonaTable</code> that gives that result, but I don't know where to start.</p>