Issues
- Issue with orphanRemoval = true and FetchType.LAZY in Hibernate 6.6.X.FinalHHH-19249
- Return of deleted entities doesn't work with naturalid multiloadingHHH-19248Jan Schatteman
- Make it possible to order type contributions analogous to function contributionsHHH-19247
- Fetch join makes partially covered EntityGraph ineffectiveHHH-19246Christian Beikov
- Make unary and binary operators easier to extendHHH-19245
- ConnectionReleaseMode.AFTER_STATEMENT ineffective for queriesHHH-19244
- jpa/core/convert TCK failure caused by "AttributeConverter' not allowed for attribute 'getId' annotated '@jakarta.persistence.Id' (use '@Convert(disableConversion=true)' to suppress this error)"HHH-19243
- EntityGraph.addSubgraph fails on entity attribute with more than one level of inheritanceHHH-19242
- Investigate proper bytecode enhancement of attributes with PROPERTY accessHHH-19241
- Significant increase in heap allocation for queries after migrating Hibernate ORM 6.5 to 6.6HHH-19240
- Ensure and validate explicit @Access annotation value on fields / gettersHHH-19239
- order_inserts doesn't consider primary keysHHH-19238
- Expand graph language to optionally specify entityHHH-19237Resolved issue: HHH-19237Steve Ebersole
- PersistenceConfiguration.SCHEMAGEN_CREATE_TARGET doesn't seem to workHHH-19236
- Ability to eager batch fetch associations based on non-pk fkHHH-19235
- Ability to configure cursor holdabiltyHHH-19234Resolved issue: HHH-19234
- AssertionError after Upgrade to Hibernate 6.6.8HHH-19233
- BeanValidationEventListener not called if only associated collection is updated via getterHHH-19232Resolved issue: HHH-19232Marco Belladelli
- Composite User Types provided through TypeContributor are incorrectly registeredHHH-19231
- Ensure that thread local for org.hibernate.bytecode.enhance.internal.bytebuddy.SafeCacheProvider + OverridingClassFileLocator are completely clearedHHH-19230Christian Beikov
- Faster checks in ReflectHelperHHH-19229Olivier Bourgain
- Upgrade MySQL testing to version 9.2HHH-19228
- errors in class OracleSDOFunctionDescriptorsHHH-19227Resolved issue: HHH-19227Karel Maesen
- Remove support for SQL Server versions older than 2016HHH-19226
- Remove support for MariaDB versions older than 10.6HHH-19225
- TransientObjectException on session.remove()HHH-19224
- Upgrade JBoss Logging Tools (processor) to 3.0.4.FinalHHH-19223Marko Bekhta
- SAP Hana - Memory Leak with Identity GenerationHHH-19222
- Dialect catalog separator ignored with not allowed metadata on boot optionHHH-19221
- ClassCastException: class org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to class java.lang.StringHHH-19220Resolved issue: HHH-19220Andrea Boriero
- Informix Catalog and schema supportHHH-19219Resolved issue: HHH-19219Vladimír Kuruc
- Consider a stronger hashing function for cache keysHHH-19218
- Expose GraphParser#parse on SessionFactoryHHH-19217Resolved issue: HHH-19217Steve Ebersole
- NamedEntityGraph annotation supporting Hibernate parseable formatHHH-19216Resolved issue: HHH-19216Steve Ebersole
- Extends Dialect#addQueryHints to support straight_join syntaxHHH-19215Hogeun Chung
- Record as @IdClass - some tests are failing when record componets of ID class are not alphabetically sorted, but passing when sortedHHH-19214
- Performance decrease for SELECT query with complex WHERE clause in Hibernate 6 (compared with 5)HHH-19213
- Is @EmbeddedId intentionally excluded from Dirty Checking, considering it as immutable?HHH-19212Resolved issue: HHH-19212
- Follow-on-locking silently breaks pessimistic lock semanticsHHH-19211
- Change how the ValidationMode.AUTO behaves (Handle jakarta.validation.NoProviderFoundException)HHH-19210Marko Bekhta
- Verify and fix ID class generation for inner classesHHH-19209Čedomir Igaly
- Javadoc of org.hibernate.cfg.QuerySettings.QUERY_PLAN_CACHE_ENABLED mentions that the query plan cache is disabled by default, but it is enabled by defaultHHH-19208
- JPA OrderBy annotated relation not ordered when using entity graph with criteria apiHHH-19207
- Bytecode-enhanced dirty checking ineffective if entity's embedded ID set manually (to same value)HHH-19206Resolved issue: HHH-19206Christian Beikov
- Do not recreate the validator on each BeanValidationEventListener#validate callHHH-19205Marko Bekhta
- ClassCastException with usages of static java.sql.Date#from(Instant) that are in fact calling java.util.Date#from(Instant) and returning java.util.Date objectsHHH-19204
- Unexpected association fetch triggered by Bean Validation integrationHHH-19203
- array_intersects doesn't work with an array as a parameterHHH-19202
- BlobProxy with InputStream reads whole stream into a byte arrayHHH-19201
- Add configuration to make lob stream binding manually configurable in hibernateHHH-19200
50 of
I’ve encountered an issue after upgrading to Hibernate 6.6.9.Final from 6.4.10.Final related to the behavior of
orphanRemoval = true
when combined withFetchType.LAZY
.Issue Description
In previous Hibernate versions, if I had a lazily-loaded collection with
orphanRemoval = true
and saved the parent entity without explicitly initializing the collection, Hibernate would not attempt to delete any orphans—unless the collection was explicitly modified.However, after updating to 6.6.9.Final, it seems that Hibernate attempts to remove orphans, even if the lazy collection was never loaded or accessed. This behavior is unexpected and leads to incorrect deletions.
The last version where this behavior worked as expected (i.e., the test passes) is 6.5.3.Final. From version 6.6.0.Final onward, this issue starts to occur.
Reproducer: