mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-10 13:14:50 +00:00
I suspect the original goal of having a single list of hydrated objects for all rows was to avoid instantiating one list per row, but we did just that in the fix in the last commit. This introduces a hack to signal that we're starting to process a new row while still keeping a flat, single-list structure: we inserting null elements in the list of hydrated objects. This is admittedly very ugly, but it's the only solution I can come up with if we want to keep the number of memory allocations similar to what we used to have. And hopefully this code will disappear in ORM 6.0.