mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1385: INDEX BY doesn't work for selects with scalars only #1733
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 (Sep 21, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user strygin:
By scalars-only-selects I mean this:
The result won't be indexed by c.id, as opposites to this:
Assuming that GLocalityBundle:Country has several hunders of fields, and you need only two of them, this is very disappointing :(
After diving in the code, due to rigorous separation of entities on objects and scalars, it looks practically impossible even to implement this feature :(
What is this? Bad design?
@doctrinebot commented on GitHub (Sep 25, 2011):
Comment created by @beberlei:
I agree it seems very complex to implement for the Object and ArrayHydrator, however it should be very easy for the getScalarResult() hydrator.
Even more I think there is a general bug with INDEX BY and scalars in Object and ArrayHydrator that has to be evaluated.
@doctrinebot commented on GitHub (Oct 31, 2011):
Comment created by @beberlei:
This PR will fix this issue https://github.com/doctrine/doctrine2/pull/151, it is scheduled for 2.2
@doctrinebot commented on GitHub (Nov 8, 2011):
Comment created by @beberlei:
This is fixed in master
@doctrinebot commented on GitHub (Nov 8, 2011):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Apr 1, 2012):
Comment created by deatheriam:
This behavior has not changed in the latest 2.2.1. getArrayResult returns an indexed result. getScalarResult returns zero based result. Do I need to create a separate ticket for that issue?