No single column hydration #5586

Closed
opened 2026-01-22 15:12:00 +01:00 by admin · 5 comments
Owner

Originally created by @MarekKarmelski on GitHub (Jun 23, 2017).

Originally assigned to: @Ocramius on GitHub.

Doctrine don't have single column hydrator that return one dimensional array, doctrine return nested arrays with single column values. Can I create PR with new hydrator?

Originally created by @MarekKarmelski on GitHub (Jun 23, 2017). Originally assigned to: @Ocramius on GitHub. Doctrine don't have single column hydrator that return one dimensional array, doctrine return nested arrays with single column values. Can I create PR with new hydrator?
admin added the ImprovementWon't FixQuestion labels 2026-01-22 15:12:00 +01:00
admin closed this issue 2026-01-22 15:12:01 +01:00
Author
Owner

@Ocramius commented on GitHub (Jun 23, 2017):

@MarekKarmelski is it worth doing that? Usually, array_map('reset', $result) does that...

@Ocramius commented on GitHub (Jun 23, 2017): @MarekKarmelski is it worth doing that? Usually, `array_map('reset', $result)` does that...
Author
Owner

@MarekKarmelski commented on GitHub (Jun 23, 2017):

Yeap but in this case You need use php language to do this, I think better will be move this layer upper to db drive? What You think?

@MarekKarmelski commented on GitHub (Jun 23, 2017): Yeap but in this case You need use php language to do this, I think better will be move this layer upper to db drive? What You think?
Author
Owner

@Ocramius commented on GitHub (Jun 23, 2017):

@MarekKarmelski the question is: "is it worth it"?

That single call is not going to be your bottleneck, so my opinion here is that this is not needed at all.

@Ocramius commented on GitHub (Jun 23, 2017): @MarekKarmelski the question is: "is it worth it"? That single call is not going to be your bottleneck, so my opinion here is that this is not needed at all.
Author
Owner

@MarekKarmelski commented on GitHub (Jun 23, 2017):

@Ocramius One line of code less :) If You think that it isn't worth it, You can close this issue :).

@MarekKarmelski commented on GitHub (Jun 23, 2017): @Ocramius One line of code less :) If You think that it isn't worth it, You can close this issue :).
Author
Owner

@Ocramius commented on GitHub (Jun 23, 2017):

One line of code less :)

You'd have to write a lot more lines of code that would need maintenance, documentation and BC in the ORM ;-)

@Ocramius commented on GitHub (Jun 23, 2017): > One line of code less :) You'd have to write a lot more lines of code that would need maintenance, documentation and BC in the ORM ;-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5586