DDC-3593: INDEX BY doesnt't work for NEW ArticleDTO #4419

Open
opened 2026-01-22 14:41:16 +01:00 by admin · 1 comment
Owner

Originally created by @doctrinebot on GitHub (Mar 1, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user voda:

With this query the resulting array is not indexed by id, but from zero

$query = $em->createQuery('SELECT NEW ArticleDTO(a.id, a.title) FROM Article a INDEX BY a.id');
$articles = $query->getResult();
Originally created by @doctrinebot on GitHub (Mar 1, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user voda: With this query the resulting array is not indexed by id, but from zero ``` php $query = $em->createQuery('SELECT NEW ArticleDTO(a.id, a.title) FROM Article a INDEX BY a.id'); $articles = $query->getResult(); ```
admin added the Bug label 2026-01-22 14:41:16 +01:00
Author
Owner

@Majkl578 commented on GitHub (Jun 22, 2016):

Bump, still broken in 2.5.4. 😢

@Majkl578 commented on GitHub (Jun 22, 2016): Bump, still broken in 2.5.4. 😢
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4419