title: CakePhp 3 - All roles of my Users Table are register in my Client Table, but I only want Client role
body: <p>I'm a newbee in Cakephp and I have to build a project-management interface for the company where I work in internship. My boss gave me the tables and I have to make the associations. </p>
  
  <p>I have 3 main tables : </p>
  
  <ul>
  <li>MyUsers = a User can have a role between this 3 : Associate, Collaborater, Client</li>
  <li>Role = Associate, Collaborater, Client</li>
  <li>Client = a "subpart" of the MyUsers table for save informations of Clients. </li>
  </ul>
  
  <p>When I create MyUser and attritute the Client role I would like to register a new Entity in the Client Table. At the moment I tried this in the add function of MyUsersController: </p>
  
  <pre><code> public function add()
  {
      $myUser = $this-&gt;MyUsers-&gt;newEntity();
  
      if ($this-&gt;request-&gt;is('post')) {
          $myUser = $this-&gt;MyUsers-&gt;patchEntity($myUser, $this-&gt;request-&gt;getData());
  
          if ($this-&gt;MyUsers-&gt;save($myUser)) {
  
              $clientsTable = TableRegistry::get('Clients');
              $client = $clientsTable-&gt;newEntity();
  
              // association id user au client
              $client-&gt;user_id = $myUser-&gt;id;
  
              if ($clientsTable-&gt;save($client)) {
                  debug('Yeah !');
              }
  
              $this-&gt;Flash-&gt;success(__('The my user has been saved.'));
  
              return $this-&gt;redirect(['action' =&gt; 'index']);
          }
          $this-&gt;Flash-&gt;error(__('The my user could not be saved. Please, try again.'));
  }
  
      $roles = $this-&gt;MyUsers-&gt;Roles-&gt;find('list', ['limit' =&gt; 200]);
      $this-&gt;set(compact('myUser', 'roles'));
  }
  </code></pre>
  
  <p>Obviously it doesn't work because the role 'Client' is assigned at the time of creating the user. With this function all my Users are register in the Clients Table without role distinction.</p>
  
  <p>Do you have any idea how to do to have only Users with Client role?</p>
  
  <p>This is the first time I'm posting here so please tell me if you need any other part of code :) </p>
  
  <p>I hope my English is not too bad :/ </p>
  
  <p>Thank's :) </p>