#1492: Non-selected fields appear in query results
------------------------------+---------------------------------------------
  Reporter:  colnector        |       Owner:  romanb               
      Type:  defect           |      Status:  new                  
  Priority:  major            |   Milestone:                       
 Component:  Query/Hydration  |     Version:  1.0                  
Resolution:                   |    Keywords:                       
  Has_test:  0                |    Mystatus:  Pending Core Response
 Has_patch:  0                |  
------------------------------+---------------------------------------------
Comment (by colnector):

 jwage, I believe what you've written does not apply to array hydration in
 simple queries in which the result set is simply an array(array()) and not
 deeper. I think adding PKs should be revised.

 I've tested now and HYDRATE_NONE does add the keys. I'm not sure
 Doctrine_RawSql::getSqlQuery is where this happens but it does happen
 there as well.

 romanb, this is exactly what this ticket is about. Adding the PKs when not
 needed. On my side, you can mark this one as fixed when PKs will be added
 only when mandatory (object hydration and complex array hydration).
 Thanks.

 Also, it's very hard to use HYDRATE_NONE since all results are not fetched
 as associate arrays but numeric arrays such as:
 {{{
 Array
 (
     [0] => Array
         (
             [0] => 1075
             [1] => 36949
         )

     [1] => Array
         (
             [0] => 1075
             [1] => 36949
         )

 )

 }}}
 I think this can be tweaked in PDO and would be helpful if offered as an
 option.

 Last thing: the HDRATE_SCALAR and HYDRATE_SINGLE_SCALAR seem like very
 good additions :) They don't, however, address the issues raised in this
 ticket.

-- 
Ticket URL: <http://trac.phpdoctrine.org/ticket/1492#comment:13>
Doctrine <http://www.phpdoctrine.org>
PHP Doctrine Object Relational Mapper
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" group.
 To post to this group, send email to [email protected]
 To unsubscribe from this group, send email to [EMAIL PROTECTED]
 For more options, visit this group at 
http://groups.google.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to