NullPointerException on AbstractEntityPersister.resolveDirtyAttributeIndexes

Description

Using build-time bytecode enhancement with lazy initialization and dirty tracking.
Using a bi-directional @OneToOne(fetch = LAZY). The problem occurs with and without @LazyToOne(NO_PROXY) on the parent.

When hibernate.bytecode.allow_enhancement_as_proxy is true:

previousState contains null values at AbstractEntityPersister.resolveDirtyAttributeIndexes, producing NPE:

When hibernate.bytecode.allow_enhancement_as_proxy is off it does not happen.

Is a reproducible example absolutely necessary in this case?

Regards

Environment

None

Activity

Show:
Tomas Lamr
December 9, 2020, 10:35 AM

Seems related to HHH-14329

Tomas Lamr
December 9, 2020, 12:01 PM
Edited

I confirm that fixes this for us

Thanks a lot!

Patrice Blanchardie
December 10, 2020, 6:19 AM

I confirm it fixes the bug for us too, thanks!

Sanne Grinovero
December 14, 2020, 5:20 PM

hi all, version 5.4.26.Final is being sent to all mirrors. You should be able to upgrade soon.

Tomas Lamr
December 14, 2020, 5:29 PM

awesome Sanne, thanks a lot!

Fixed

Assignee

Christian Beikov

Reporter

Patrice Blanchardie

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.4.15
5.4.20
5.4.22
5.4.23

Components

Affects versions

Priority

Major
Configure