Open issues

DefaultMergeEventListener.unproxyManagedForDetachedMerging fails if parameter managed is a HibernateProxy
HHH-13624
@OneToMany with @JoinTable throws org.hibernate.exception.ConstraintViolationException
HHH-13578
hibernate-mapping3.0.dtd is invalid after update 6/27/2019
HHH-13469
order by attribute of joined entity with distinct: Order by expression must be in the result list JdbcSQLSyntaxErrorException SQLGrammarException
HHH-13434
@MapsId stopped working correctly migrating from hibernate 5.3 to 5.4
HHH-13413
Failure loading list mapped with @OrderColumn(updatable = false, insertable = false)
HHH-13273
@JoinFormula and @Generated behave differentlly on java 6 vs. java 8
HHH-13150
API/SPI binary compatibility testing
HHH-12502
Entities with InheritanceType.SINGLE_TABLE and SecondaryTable not being saved properly
HHH-12009
Getting nullpointer exception while executing query
HHH-11229
Reattaching entity with one-to-many lazy list mapped collection can update index column
HHH-10743
Cache71Dialect error
HHH-10620
HbmMetadataSourceProcessor issue when combining annotation and hbm.
HHH-10609
Dynamic filter parameter on OneToMany collection is not bound to elements() expression in WHERE clause
HHH-10109
Applying JPA lifecycle callbacks needs major overhaul
HHH-8931
unable to pass null values to natural id's when using second-level cache
HHH-8928
useScrollableResultSetToSkip not used
HHH-7753
Support for IMS Transaction Manager running on z/OS on System z Hardware
HHH-7270
Filtered joined collection is uninitialized
HHH-7141
map-key-many-to-many and cascade="all-delete-orphan" do not work together
HHH-6574
<properties> for annotations
HHH-4342
Null foreign key results in Transient Object Exception
HHH-2612
rework HQL translator
HHH-2407
Fields annotated with @Column(updatable=false) are not inserted properly after persist() is called
HHH-13637
High memory usage in queryPlanCache when entity batching is enabled
HHH-13629
Silent failure to update schema with new entities when entity column definition is wrong
HHH-13626
Unique constraints fail to apply if at least one contains non unique elements
HHH-13468
ForeignGenerator Throws ClassCastException When Using StatelessSession
HHH-13456
WildFly 15 and up fails with a NPE when executing the following native PostgreSQL query
HHH-13438
Problem in MariaDB implementation
HHH-13406
Query Cache should not be allowed for queris having Non Cacheable Query Spaces
HHH-13331
isBound Returning false for collections
HHH-13321
setParameter doesn't work in native Query if Query is already executed with different parameter value for collection type when new collection length is less than the previous
HHH-13319
L1 Cache object updating issue
HHH-13174
Selecting inverse OneToOne with additional selects in query wrongly produces null
HHH-12885
Cannot update a Sub Entiy with the strategy InheritanceType.JOINED and when the addnotation @IdClass is specified in the super entity
HHH-12862
java.sql.SQLException: Invalid column type: 2012 when using Hibernate and Oracle stored procedure with REF_CURSOR
HHH-12703
Hibernate transaction can't recover from a DB restart
HHH-12513
Referential Integrity Constraint Violation - Unidirectional OneToOne with Cascade.ALL, optional false and @PrimaryKeyColumnJoin
HHH-12414
Session is not unset for PersistentBag loaded in temp session.
HHH-12210
Update and Get through Mysql Stored Procedure
HHH-12161
AbstractProducedQuery trying to call setCacheMode on StatelessSessionImpl, causing UnsupportedOperationException
HHH-12012
SOME AND parenthesis are required in the SQL query
HHH-12005
PESSIMISTIC_WRITE doesn't autoFlush before find/lock
HHH-12002
Connection is Closed after commit
HHH-11972
em.find() ignores QueryHints.HINT_READONLY
HHH-11958
Hibernate ActionQueue.sort() removes entities from insertion batches
HHH-11920
Lost Update caused by optimistic lock excluded attributes
HHH-11893
Installing an Interceptor in an Integrator is broken
HHH-11880
UpdateTimestampCache generates puts for non-cached regions
HHH-11869
issue 1 of 2861

DefaultMergeEventListener.unproxyManagedForDetachedMerging fails if parameter managed is a HibernateProxy

Description

The method DefaultMergeEventListener.unproxyManagedForDetachedMerging contains a bug in case the parameter managed is a HibernateProxy. It results in a StaleObjectStateException because DefaultMergeEventListener.isVersionChanged() always return true.

The code in DefaultMergeEventListener.unproxyManagedForDetachedMerging
if ( incoming instanceof HibernateProxy ) {
return source.getPersistenceContextInternal().unproxy( managed );
}

should be replaced by
if ( managed instanceof HibernateProxy ) {
return source.getPersistenceContextInternal().unproxy( managed );
}

to make it working again.

Environment

Hibernate ORM 5.4.4, JVM 11.0.2, Windows 10, Oracle 12

Status

Assignee

Unassigned

Reporter

Reto Urfer

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.0

Components

Affects versions

5.4.4

Priority

Blocker