title: Criteria: "undefined offset"
body: <p>i have this schema below, i have generated the classes using symfony
  and created a pair of objects using the form class generated.</p>
  
  <pre><code>moto:
    marca: { type: varchar(255), required: true }
    matricula: { type: integer, required: true }
  </code></pre>
  
  <p>Now i have this criteria:</p>
  
  <pre><code>  $c = new Criteria();
    $c-&gt;addSelectColumn('MAX('.MotoPeer::MATRICULA.')');
    $max_matricula = MotoPeer::doSelect($c);
    var_dump($max_matricula);
    return $max_matricula;
  </code></pre>
  
  <p>When i call the criteria code It works ok, but these three notices
  below are showed.</p>
  
  <p>Any idea?</p>
  
  <p>sf 1.4/propel 1.4</p>
  
  <blockquote>
    <p>( ! ) Notice: Undefined offset: 2 in
    /opt/lampp/htdocs/prueba/lib/
    model/om/BaseMotoPeer.php on line 379
    Call Stack</p>
    
    <h1>Time    Memory  Function        Location 1       0.0008  328076</h1>
    
    <p>{main}( )       ../frontend_dev.php:0
    2       0.1974  4333236
    sfContext->dispatch( )<br>
    ../frontend_dev.php:13 3       0.1974 
    4333264
    sfFrontWebController->dispatch( )<br>
    ../ sfContext.class.php:170 4<br>
    0.1981  4350256 sfController->forward( )     ../
    sfFrontWebController.class.php:48 5<br>
    0.2134  4641000 sfFilterChain->execute( )<br>
    ../sfController.class.php: 238 6<br>
    0.2138  4641808 sfRenderingFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 7<br>
    0.2138  4641808 sfFilterChain->execute( )    ../
    sfRenderingFilter.class.php:33 8<br>
    0.2143  4642588 sfExecutionFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 9<br>
    0.2144  4643308 sfExecutionFilter->handleAction( )<br>
    ../ sfExecutionFilter.class.php:42 10 
    0.2144  4643308 sfExecutionFilter->executeAction( ) 
    ../ sfExecutionFilter.class.php:78 11 
    0.2144  4643336 sfActions->execute( )        ../sfExecutionFilter.class.php: 92 12 
    0.2147  4644160 motoActions->executePrueba( )<br>
    ../sfActions.class.php: 60 13<br>
    0.2212  5026172 MotoPeer::prueba( )     ../actions.class.php:14 14      0.2254
    5285592 BaseMotoPeer::doSelect( )<br>
    ../MotoPeer.php:26 15      0.2493 
    5756176 BaseMotoPeer::populateObjects(
    )        ../BaseMotoPeer.php: 241 16<br>
    0.2493  5756568 BaseMotoPeer::getPrimaryKeyHashFromRow(
    )       ../ BaseMotoPeer.php:400</p>
    
    <p>( ! ) Notice: Undefined offset: 1 in
    /opt/lampp/htdocs/prueba/lib/
    model/om/BaseMoto.php on line 184 Call
    Stack</p>
    
    <h1>Time    Memory  Function        Location 1       0.0008  328076</h1>
    
    <p>{main}( )       ../frontend_dev.php:0
    2       0.1974  4333236
    sfContext->dispatch( )<br>
    ../frontend_dev.php:13 3       0.1974 
    4333264
    sfFrontWebController->dispatch( )<br>
    ../ sfContext.class.php:170 4<br>
    0.1981  4350256 sfController->forward( )     ../
    sfFrontWebController.class.php:48 5<br>
    0.2134  4641000 sfFilterChain->execute( )<br>
    ../sfController.class.php: 238 6<br>
    0.2138  4641808 sfRenderingFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 7<br>
    0.2138  4641808 sfFilterChain->execute( )    ../
    sfRenderingFilter.class.php:33 8<br>
    0.2143  4642588 sfExecutionFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 9<br>
    0.2144  4643308 sfExecutionFilter->handleAction( )<br>
    ../ sfExecutionFilter.class.php:42 10 
    0.2144  4643308 sfExecutionFilter->executeAction( ) 
    ../ sfExecutionFilter.class.php:78 11 
    0.2144  4643336 sfActions->execute( )        ../sfExecutionFilter.class.php: 92 12 
    0.2147  4644160 motoActions->executePrueba( )<br>
    ../sfActions.class.php: 60 13<br>
    0.2212  5026172 MotoPeer::prueba( )     ../actions.class.php:14 14      0.2254
    5285592 BaseMotoPeer::doSelect( )<br>
    ../MotoPeer.php:26 15      0.2493 
    5756176 BaseMotoPeer::populateObjects(
    )        ../BaseMotoPeer.php: 241 16<br>
    0.2578  5953424 BaseMoto->hydrate( ) ../BaseMotoPeer.php:408</p>
    
    <p>( ! ) Notice: Undefined offset: 2 in
    /opt/lampp/htdocs/prueba/lib/
    model/om/BaseMoto.php on line 185 Call
    Stack</p>
    
    <h1>Time    Memory  Function        Location 1       0.0008  328076</h1>
    
    <p>{main}( )       ../frontend_dev.php:0
    2       0.1974  4333236
    sfContext->dispatch( )<br>
    ../frontend_dev.php:13 3       0.1974 
    4333264
    sfFrontWebController->dispatch( )<br>
    ../ sfContext.class.php:170 4<br>
    0.1981  4350256 sfController->forward( )     ../
    sfFrontWebController.class.php:48 5<br>
    0.2134  4641000 sfFilterChain->execute( )<br>
    ../sfController.class.php: 238 6<br>
    0.2138  4641808 sfRenderingFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 7<br>
    0.2138  4641808 sfFilterChain->execute( )    ../
    sfRenderingFilter.class.php:33 8<br>
    0.2143  4642588 sfExecutionFilter->execute( )<br>
    ../ sfFilterChain.class.php:53 9<br>
    0.2144  4643308 sfExecutionFilter->handleAction( )<br>
    ../ sfExecutionFilter.class.php:42 10 
    0.2144  4643308 sfExecutionFilter->executeAction( ) 
    ../ sfExecutionFilter.class.php:78 11 
    0.2144  4643336 sfActions->execute( )        ../sfExecutionFilter.class.php: 92 12 
    0.2147  4644160 motoActions->executePrueba( )<br>
    ../sfActions.class.php: 60 13<br>
    0.2212  5026172 MotoPeer::prueba( )     ../actions.class.php:14 14      0.2254
    5285592 BaseMotoPeer::doSelect( )<br>
    ../MotoPeer.php:26 15      0.2493 
    5756176 BaseMotoPeer::populateObjects(
    )        ../BaseMotoPeer.php: 241 16<br>
    0.2578  5953424 BaseMoto->hydrate( ) ../BaseMotoPeer.php:408</p>
  </blockquote>
  
  <p>EDIT: the <strong>first notice</strong> appears because i didn't write "id: ~" before the fields of the model. Here it goes the lines that causes <strong>the second and the third notices</strong>:</p>
  
  <pre><code>    /**
       * Hydrates (populates) the object variables with values from the database resultset.
       *
       * An offset (0-based "start column") is specified so that objects can be hydrated
       * with a subset of the columns in the resultset rows.  This is needed, for example,
       * for results of JOIN queries where the resultset row includes columns from two or
       * more tables.
       *
       * @param      array $row The row returned by PDOStatement-&gt;fetch(PDO::FETCH_NUM)
       * @param      int $startcol 0-based offset column which indicates which restultset column to start with.
       * @param      boolean $rehydrate Whether this object is being re-hydrated from the database.
       * @return     int next starting column
       * @throws     PropelException  - Any caught Exception will be rewrapped as a PropelException.
       */
      public function hydrate($row, $startcol = 0, $rehydrate = false)
      {
          try {
  
  var_dump($row);
  
      $this-&gt;id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null; 
      $this-&gt;marca = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;//184
      $this-&gt;matricula = ($row[$startcol + 2] !== null) ? (int) $row[$startcol + 2] : null;//185
  </code></pre>
  
  <p>I think, the second and the third notices are showed because in the criteria I'm just getting one column (maatricula). But how to do it so?</p>
  
  <p>Javier</p>