title: Cakephp 2 use the id of the record as index when retrieving data
body: <p>Is it possible to retrieve records where the index is the record id?</p>
  
  <p>I have a model with a hasMany Relation. So my study can have multiple texts and questions etc.</p>
  
  <p>The custom retrieve function looks like this:</p>
  
  <pre><code>    protected function _findStudyWithSequence($state, $query, $results=array()){
      if ($state === 'before') {
          $query['contain'] = array(
              'SubjectFilter'=&gt;array('fields'=&gt;'SubjectFilter.studyCode'),
              'Text'=&gt;array('fields'=&gt;'Text.position,Text.id,Text.text','order'=&gt;array('position')),
              'Image'=&gt;array('fields'=&gt;'Image.position, Image.id','order'=&gt;array('position')),
              'Video'=&gt;array('fields'=&gt;'Video.position, Video.id','order'=&gt;array('position')),
              'Web'=&gt;array('fields'=&gt;'Web.position, Web.id','order'=&gt;array('position')),
              'Likert'=&gt;array('fields'=&gt;'Likert.position, Likert.id','order'=&gt;array('position')),
              'Question'=&gt;array('fields'=&gt;'Question.position, Question.id','order'=&gt;array('position')),
              'Star'=&gt;array('fields'=&gt;'Star.position, Star.id','order'=&gt;array('position')),
              'Multiple_choice'=&gt;array('fields'=&gt;'Multiple_choice.position, Multiple_choice.id','order'=&gt;array('position'))
          );
          $query['recursive']=-1;
          $query['order']=array('Study.started DESC');
          $query['fields']=array(
                      'Study.id', 'Study.user_id','Study.title','Study.description','Study.numberParticipants','Study.state','Study.created','Study.modified','Study.started','Study.completed','Study.numberParticipants');
  
          return $query;
      }
  
      }
      return $results;
  }
  </code></pre>
  
  <p>As you can see I am using containable
  The results look like this:</p>
  
  <pre><code>array(
  'Study' =&gt; array(
      'id' =&gt; '1845346986',
      'user_id' =&gt; '1402402538',
      'title' =&gt; 'bla bla',
      'description' =&gt; '',
      'numberParticipants' =&gt; '10',
      'state' =&gt; 'active',
      'created' =&gt; '2017-08-21 14:06:11',
      'modified' =&gt; '2017-08-21 14:29:56',
      'started' =&gt; '2017-08-21 14:30:06',
      'completed' =&gt; '0000-00-00 00:00:00',
  ),
  'SubjectFilter' =&gt; array(
      'studyCode' =&gt; null
  ),
  'Text' =&gt; array(
      (int) 0 =&gt; array(
          'position' =&gt; '0',
          'id' =&gt; '1423909242',
          'text' =&gt; '&lt;p&gt;Bla &lt;b&gt;bla &lt;/b&gt;&lt;/p&gt;&lt;p&gt;blub&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;',
          'study_id' =&gt; '1845346986'
      )
  ),
  'Question' =&gt; array(
      (int) 0 =&gt; array(
          'position' =&gt; '4',
          'id' =&gt; '729521908',
          'study_id' =&gt; '1845346986'
      )
  ), etc
  </code></pre>
  
  <p>But I want the Text and Question index to be the ids. Like this:</p>
  
  <pre><code>'Text' =&gt; array(
      (int) 1423909242 =&gt; array(
          'position' =&gt; '0',
          'id' =&gt; '1423909242',
          'text' =&gt; '&lt;p&gt;Bla &lt;b&gt;bla &lt;/b&gt;&lt;/p&gt;&lt;p&gt;blub&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;',
          'study_id' =&gt; '1845346986'
      )
  ),
  </code></pre>
  
  <p>How can i manage this?</p>