[hibernate/hibernate-orm] b9270e: HHH-14620 Do not initialize collections just to ta...
by Yoann Rodière
Branch: refs/heads/main
Home: https://github.com/hibernate/hibernate-orm
Commit: b9270e44b186dd0f2eb9821e1c766e01249d4bd5
https://github.com/hibernate/hibernate-orm/commit/b9270e44b186dd0f2eb9821...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/LazyAttributeLoadingInterceptor.java
M hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java
Log Message:
-----------
HHH-14620 Do not initialize collections just to take a snapshot of their size
As far as I can tell this is safe enough for dirty tracking:
* The collection tracker will return a size of -1 for that collection
* Which is exactly the behavior we currently get after
$$_hibernane_clearDirtyCollectionNames is called if a collection has
been "retrieved" (getter called) but was not initialized.
* This will mainly prevent some optimizations because we will no longer
be able to tell whether a collection is "dirty" or not.
I think we should be able to restore those optimizations: for
PersistentCollection instances, we would store the "initial" size
inside the collection itself upon initialization,
and we would compare THAT size to the current size in implementations
of $$_hibernate_areCollectionFieldsDirty (see
org.hibernate.bytecode.enhance.internal.bytebuddy.CodeTemplates).
Alternatively we could store the CollectionTracker inside the
PersistentCollection so that the collection can update the tracker
upon initialization.
However, that's outside the scope of this bug, that would require
significant testing, and that may cause conflicts with ORM 6, so I won't
do it here.
Commit: 12cb577f9f7febf0cfcd709289495aa7be8c799a
https://github.com/hibernate/hibernate-orm/commit/12cb577f9f7febf0cfcd709...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java
Log Message:
-----------
HHH-14620 Test incorrect initialization of a collection with extended bytecode enhancement
Commit: ccc5eb13054af130f9132fcf1c7808901fa9e2c9
https://github.com/hibernate/hibernate-orm/commit/ccc5eb13054af130f9132fc...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M hibernate-core/src/test/java/org/hibernate/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java
Log Message:
-----------
HHH-14620 Remove duplicate assertions in LazyCollectionLoadingTest
Compare: https://github.com/hibernate/hibernate-orm/compare/eb6c68cdc608...ccc5eb1...
3 years, 10 months
[hibernate/hibernate-orm] 2e875f: HHH-14617 remove QueryLiteralRendering and Literal...
by Christian Beikov
Branch: refs/heads/wip/6.0
Home: https://github.com/hibernate/hibernate-orm
Commit: 2e875f9b8a83ac090f673d374f0f1ae113870c7e
https://github.com/hibernate/hibernate-orm/commit/2e875f9b8a83ac090f673d3...
Author: nathan.xu <nathan.xu(a)procor.com>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc
M hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java
M hibernate-core/src/main/java/org/hibernate/boot/spi/AbstractDelegatingSessionFactoryOptions.java
M hibernate-core/src/main/java/org/hibernate/boot/spi/SessionFactoryOptions.java
M hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java
R hibernate-core/src/main/java/org/hibernate/query/QueryLiteralRendering.java
R hibernate-core/src/main/java/org/hibernate/query/criteria/LiteralHandlingMode.java
M hibernate-core/src/main/java/org/hibernate/query/sqm/internal/SqmCriteriaNodeBuilder.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/literal/CriteriaLiteralHandlingModeBindTest.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/literal/CriteriaLiteralHandlingModeInlineShortNameLowercaseTest.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/literal/CriteriaLiteralHandlingModeInlineShortNameUppercaseTest.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/literal/CriteriaLiteralHandlingModeInlineTest.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/literal/MySQLCriteriaLiteralHandlingModeInlineTest.java
M hibernate-core/src/test/java/org/hibernate/jpa/test/criteria/selectcase/SelectCaseLiteralHandlingBindTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/intg/sqm/HqlTranslationNoFactoryTests.java
Log Message:
-----------
HHH-14617 remove QueryLiteralRendering and LiteralHandlingMode
3 years, 10 months