[hibernate/hibernate-orm] 560722: HHH-15473 Copy/paste a few select tests to set col...
by Yoann Rodière
Branch: refs/heads/main
Home: https://github.com/hibernate/hibernate-orm
Commit: 560722dfaaafab27d573d20b6c2ddfe784ad688a
https://github.com/hibernate/hibernate-orm/commit/560722dfaaafab27d573d20...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2022-09-07 (Wed, 07 Sep 2022)
Changed paths:
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/CascadeDeleteCollectionWithCollectionInDefaultFetchGroupFalseTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/CascadeOnUninitializedWithCollectionInDefaultFetchGroupFalseTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingCollectionInDefaultFetchGroupFalseTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDetachWithCollectionInDefaultFetchGroupFalseTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SimpleUpdateWithLazyLoadingWithCollectionInDefaultFetchGroupFalseTest.java
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadWithCollectionInDefaultFetchGroupFalseTest.java
Log Message:
-----------
HHH-15473 Copy/paste a few select tests to set collectionInDefaultFetchGroup to false explicitly
Commit: febfd9d4b8873640ce1b37794351d8c01b573afa
https://github.com/hibernate/hibernate-orm/commit/febfd9d4b8873640ce1b377...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2022-09-07 (Wed, 07 Sep 2022)
Changed paths:
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/CascadeDeleteCollectionTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/cascade/CascadeOnUninitializedTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingCollectionInDefaultFetchGroupTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionDetachTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/SimpleUpdateTestWithLazyLoading.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/ondemandload/OnDemandLoadTest.java
Log Message:
-----------
HHH-15473 Don't confuse property initialization for collection initialization in tests
Checking for property initialization was acceptable and pretty
much the only way to perform assertions before we fixed HHH-14620,
but now that initializing a property doesn't imply initializing
the collection, it's just plain wrong:
* If you expect the collection *not* to be initialized, then
checking that that the property is not initialized is too strict:
the assertion could fail because the property is initialized
while the collection is not initialized.
* If you expect the collection to be initialized, then
checking that that the property is initialized is not enough:
the assertion could pass because the property is initialized
while the collection is not initialized.
Besides, we can safely call the getter to test the collection
directly with Hibernate.isInitialized(entity.getCollection())
since a call to the getter is not supposed to trigger collection
initialization.
Commit: 1399f3e65e80c5ebd28204afcdae423104e01689
https://github.com/hibernate/hibernate-orm/commit/1399f3e65e80c5ebd28204a...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2022-09-07 (Wed, 07 Sep 2022)
Changed paths:
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingCollectionInDefaultFetchGroupTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingPersistTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/MultipleBagsInLazyFetchGroupTest.java
Log Message:
-----------
HHH-15473 Actually set enableCollectionInDefaultFetchGroup(true) in relevant tests
The previous setup code was being ignored, so
enableCollectionInDefaultFetchGroup was actually `false` in these
tests...
Commit: 767ff43d8c17979b59503a0f1dc8174d017e981e
https://github.com/hibernate/hibernate-orm/commit/767ff43d8c17979b59503a0...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2022-09-07 (Wed, 07 Sep 2022)
Changed paths:
A hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/LazyProxyBytecodeEnhancementCollectionInitializationTest.java
Log Message:
-----------
HHH-15473 Test that collection properties are not initialized immediately on lazy proxies with enableCollectionInDefaultFetchGroup = true
Commit: c0afae8cb33647111c4d3360974d33a99800694a
https://github.com/hibernate/hibernate-orm/commit/c0afae8cb33647111c4d336...
Author: Yoann Rodière <yoann(a)hibernate.org>
Date: 2022-09-07 (Wed, 07 Sep 2022)
Changed paths:
M hibernate-core/src/main/java/org/hibernate/boot/SessionFactoryBuilder.java
M hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingCollectionInDefaultFetchGroupTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/dirty/DirtyTrackingPersistTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/LazyCollectionLoadingTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/MultipleBagsInLazyFetchGroupTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/cache/UninitializedAssociationsInCacheTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/BytecodeEnhancedLazyLoadingOnDeletedEntityTest.java
M hibernate-core/src/test/java/org/hibernate/orm/test/bytecode/enhancement/lazy/proxy/LazyProxyBytecodeEnhancementCollectionInitializationTest.java
Log Message:
-----------
HHH-15473 Instantiate collections in the default fetch group by default
Compare: https://github.com/hibernate/hibernate-orm/compare/16f865f100c3...c0afae8...
2 years, 3 months