ClassCastException when updating lazy loaded bytecode enhanced byte[]

Description

When updating an entities byte[] field configured as lazy loaded causes the exception:
Caused by: java.lang.ClassCastException: org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer$1 cannot be cast to [B
at org.hibernate.type.descriptor.java.PrimitiveByteArrayTypeDescriptor.areEqual(PrimitiveByteArrayTypeDescriptor.java:26) <...>

Test passes if I disable "enableLazyInitialization" or cause the field to load (via getter) before I update it.

Environment

java 1.8.0_172, windows 10

Status

Assignee

Guillaume Smet

Reporter

Mario Martinho Dias

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Affects versions

Priority

Major
Configure