mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
No single column hydration #5586
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@Ocramius commented on GitHub (Jun 23, 2017):
@MarekKarmelski is it worth doing that? Usually,
array_map('reset', $result)does that...@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?
@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.
@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 :).
@Ocramius commented on GitHub (Jun 23, 2017):
You'd have to write a lot more lines of code that would need maintenance, documentation and BC in the ORM ;-)