#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 romanb):
Array '''graph''' hydration (thats the current HYDRATE_ARRAY) needs the
PKs for the reason object hydration does: it needs to construct a graph,
decide which data belongs to what, where a new entity starts and where
data belongs.
The only hydration mode currently that does NOT need the PKs is
HYDRATE_NONE. If the PKs are added with this hydration mode I consider
this to be a bug.
I have 2 new hydration modes in the pipeline that both will not require
the PKs (HYDRATE_SCALAR/HYDRATE_SINGLE_SCALAR). I think these will fill
the gap for a lot of usecases.
HYDRATE_SCALAR => Returns flat, rectangular result set but with column
name <-> fieldname conversions, data type conversions etc.
HYDRATE_SINGLE_SCALAR => Returns a single scalar value. I.e. the following
DQL: "SELECT u.name FROM User u WHERE u.id = ?" executed with this
hydration mode would give the value directly as the result ($name =
$q->...->execute($userId)).
These will be available starting with version 1.1 i suppose.
--
Ticket URL: <http://trac.phpdoctrine.org/ticket/1492#comment:10>
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
-~----------~----~----~----~------~----~------~--~---