title: CakePHP find+list with multilevel group
body: <p>Is it possible in CakePHP to execute a find('list', ...) query from which I get a list grouped in more than one level?</p>
  
  <p>For example, if I want a list of users grouped by their roles, but also by the code of their referral contact, I would have something like this:</p>
  
  <pre><code>$usernameGroups = $this-&gt;Article-&gt;User-&gt;find('list', array(
          'fields' =&gt; array('User.username', 'User.first_name', 
                            'User.referral', 'User.group'));
  </code></pre>
  
  <p>And I want this output:</p>
  
  <pre><code>$usernameGroups = Array
  (
      ['User'] =&gt; Array
      (
          ['AxVc'] =&gt; Array
          (
              ['PHPNut'] =&gt; 'Larry',
              ['gwoo'] =&gt; 'Gwoo'
          )
          ['EQbd'] =&gt; Array
          (
              ['IronMan'] =&gt; 'Tony',
              ['Hulk'] =&gt; 'Bruce'
          )
      )
  
      ['Admin'] =&gt; Array
      (
          ['AxVc'] =&gt; Array
          (
              ['_psychic_'] =&gt; 'John',
              ['AD7six'] =&gt; 'Andy',
              ['jperras'] =&gt; 'Joël'
          )
      )
  
  )
  </code></pre>
  
  <p>Obviously I tried this and it did not work. If I leave only three fields it works perfect. Since I 'm pretty new to Cake probably I'm missing something. Is there any workaround to this problem? </p>