Select assocation id using IDENTITY function inline #5622

Closed
opened 2026-01-22 15:13:04 +01:00 by admin · 1 comment
Owner

Originally created by @rpander93 on GitHub (Jul 26, 2017).

Originally assigned to: @Ocramius on GitHub.

Hi,

I'm wondering why it isnt possible to fetch a foreign key inline with the rest of the results when hydrating to an array. Instead, it returns a mixed results as found here in the docs. Would it not be possible to include the desired field along with the rest of the results rather than the current situation? Specifically when hydrating to an array, this shouldn't be a problem I'd think.

Originally created by @rpander93 on GitHub (Jul 26, 2017). Originally assigned to: @Ocramius on GitHub. Hi, I'm wondering why it isnt possible to fetch a foreign key inline with the rest of the results when hydrating to an array. Instead, it returns a mixed results as [found here in the docs](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/dql-doctrine-query-language.html#pure-and-mixed-results). Would it not be possible to include the desired field along with the rest of the results rather than the current situation? Specifically when hydrating to an array, this shouldn't be a problem I'd think.
admin added the ImprovementWon't FixCan't FixBC BreakQuestion labels 2026-01-22 15:13:04 +01:00
admin closed this issue 2026-01-22 15:13:05 +01:00
Author
Owner

@Ocramius commented on GitHub (Aug 18, 2017):

@rpander93 as soon as you have a scalar value added to object values, the result format will change.

If you want, you can try expanding on the expected results, but I don't think this is worth inspecting/improving, as changing the behavior would be a BC break.

Closing as won't fix

@Ocramius commented on GitHub (Aug 18, 2017): @rpander93 as soon as you have a scalar value added to object values, the result format will change. If you want, you can try expanding on the expected results, but I don't think this is worth inspecting/improving, as changing the behavior would be a BC break. Closing as `won't fix`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5622