Jira issue originally created by user acasademont:
The QueryBuilder does not allow the INDEX BY clause in the form() function, so queris like 'SELECT u FROM User u INDEX BY u.id' are not possible just using the QueryBuilder. There is the option in the join() functions but when a join is not needed, you can only use DQL.
If you find id appropiate i'll work on a patch for the issue.
Comment created by sandermarechal:
I too would like to see this. I thought this issue was fixed with DDC-1145 but that only solves it for joins. It does not allow indexing on the result itself. I would like to see something like this:
Or it may be better to implement it on the query (since it affects hydration rather than the query itself):
Comment created by @guilhermeblanco:
Fixed in 80284a2
Issue was closed with resolution "Fixed"