mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2314: getResults with numeric indexes for fields #2907
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 22, 2013).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user ninjds:
When executing a simple query with field names in SELECT clause, it is not possible to map field to numeric indexes.
This is an example that i would imagine to be useful:
SELECT c.id AS 0, c.name AS 1, l.text AS 2 FROM Category c LEFT JOIN c.label lThus, the resulting results could be numeric indexed array. It is useful for many situations: when working with an API which expects such arrays, or when using
listto assign result fields to variables directly.Query::HYDRATE_SCALAR does not achieve this, as one could think at first glance.