[hibernate-commits] [hibernate/hibernate-orm] bc26c5: HHH-14124 Work around side-effects of TwoPhaseLoad...

Yoann Rodière noreply at github.com
Thu Jul 30 08:35:05 EDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/hibernate/hibernate-orm
  Commit: bc26c564a4087ba4dbfda15b591a0f6d6d7727f3
      https://github.com/hibernate/hibernate-orm/commit/bc26c564a4087ba4dbfda15b591a0f6d6d7727f3
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/loader/Loader.java

  Log Message:
  -----------
  HHH-14124 Work around side-effects of TwoPhaseLoad.initializeEntity


  Commit: 6f6874b8cfcfe2632f8be987d8dc5c7e79265bc4
      https://github.com/hibernate/hibernate-orm/commit/6f6874b8cfcfe2632f8be987d8dc5c7e79265bc4
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/loader/Loader.java

  Log Message:
  -----------
  HHH-14124 Avoid too many list allocations when hydrating query results

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.


  Commit: 1d965227c44b20597fc19d6ca6aa690753bf7324
      https://github.com/hibernate/hibernate-orm/commit/1d965227c44b20597fc19d6ca6aa690753bf7324
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/LoadAndFetchGraphTest.java

  Log Message:
  -----------
  HHH-14124 Test that the FETCH entitygraph semantic overrides EAGER associations to LAZY


  Commit: 9323d426f15279645dd37876810236ffd70fbce0
      https://github.com/hibernate/hibernate-orm/commit/9323d426f15279645dd37876810236ffd70fbce0
  Author: Yoann Rodière <yoann at hibernate.org>
  Date:   2020-07-30 (Thu, 30 Jul 2020)

  Changed paths:
    M hibernate-core/src/main/java/org/hibernate/loader/Loader.java
    M hibernate-core/src/test/java/org/hibernate/jpa/test/graphs/LoadAndFetchGraphTest.java

  Log Message:
  -----------
  HHH-14124 Test that the FETCH entitygraph semantic overrides EAGER associations to LAZY for all results


Compare: https://github.com/hibernate/hibernate-orm/compare/20273b81ee62...9323d426f152



More information about the hibernate-commits mailing list