DDC-1927: Pagination of a SELECT of specific fields results in a RuntimeException #2429

Open
opened 2026-01-22 13:52:47 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 16, 2012).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user netiul:

When paginating a DQL string which selects specific fields it results in the following error: PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Not all identifier properties can be found in the ResultSetMapping: id'

NOT working: 'SELECT c.id, c.number FROM Application\Entity\Course c'
WORKING: 'SELECT c FROM Application\Entity\Course c'
WORKING: 'SELECT c, c.id, c.number FROM Application\Entity\Course c'

Setting hydration mode to scalar results makes no difference.

Gist to example code and stack trace: https://gist.github.com/d5cd6d0b0ac28e722dd7

Originally created by @doctrinebot on GitHub (Jul 16, 2012). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user netiul: When paginating a DQL string which selects specific fields it results in the following error: PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Not all identifier properties can be found in the ResultSetMapping: id' NOT working: 'SELECT c.id, c.number FROM Application\Entity\Course c' WORKING: 'SELECT c FROM Application\Entity\Course c' WORKING: 'SELECT c, c.id, c.number FROM Application\Entity\Course c' Setting hydration mode to scalar results makes no difference. Gist to example code and stack trace: https://gist.github.com/d5cd6d0b0ac28e722dd7
admin added the BugCan't Fix labels 2026-01-22 13:52:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2429