mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1314: DQL permits partial select using SQL #1647
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 (Aug 2, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user daniel.beresh:
The following code is not correct DQL and should (I think?) throw an error:
...to force the user to use SELECT partial g.{id,name} ...
Instead, it causes very funny behaviour. eg. when iterating, objects are passed to the foreach in the following pattern:
$groups = $query->iterate();
foreach(...) {
1st time: $groups = array( [0] => object )
2nd time: $groups = array( [1] => object )
3rd time: $groups = array( [2] => object )
}
@doctrinebot commented on GitHub (Aug 2, 2011):
@doctrinebot commented on GitHub (Aug 6, 2011):
Comment created by @beberlei:
The incrementation of the return value is a bug, but SELECT g.id, g.name is valid DQL. You hydrate the values as scalars. What is funny is why it even returns an object in this case.
@doctrinebot commented on GitHub (Dec 11, 2011):
Comment created by @guilhermeblanco:
Added failing test case.
Currently it is not easily doable without larger refactoring of Hydrators.
I'll keep this opened, but my 2 attempts failed.
@doctrinebot commented on GitHub (Jun 23, 2012):
Comment created by @guilhermeblanco:
Scheduled for 3.0 since we're going to refactor the hydrators
@doctrinebot commented on GitHub (May 1, 2013):
Comment created by @beberlei:
Duplicate of DDC-2133 (better description)
@doctrinebot commented on GitHub (May 1, 2013):
Issue was closed with resolution "Duplicate"
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/5149a842b5d604b04b1b