mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #12095] Performance optimization in ScalarColumnHydrator::hydrateAllData()
#13469
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?
Original Pull Request: https://github.com/doctrine/orm/pull/12095
State: closed
Merged: Yes
This optimization removes the intermediate array allocation during scalar column hydration. Instead of fetching all numeric rows and extracting the first column via array_column, it now calls fetchFirstColumn() directly. In the context of PDO, this aligns with the driver's native behavior (e.g. Doctrine\DBAL\Driver\PDO\Result::fetchFirstColumn()), allowing the hydration layer to skip redundant copying and memory usage.