Merging a blob on an entity results in a class cast exception

Description

Merging an entity with a blob results in a class cast exception:

Test case: https://github.com/nikowitt/hibernate-test-case-templates/tree/HHH-12555

Environment

None

Activity

Show:
Luis Barreiro
May 25, 2018, 8:48 PM

You can try to generalize, but you will end up with a lot of logic on TypeHelper that really should belong to the types themselves. From a design perspective it's much better to let the types act on UNFETCHED_PROPERTY.

For I added to org.hibernate.test.type.TypeTest but blobs, clobs and nclobs are not tested there.

In the future (6.0) this will likely change and we can re-evaluate then.

Guillaume Smet
May 28, 2018, 4:40 PM

I posted something on the list regarding this issue: http://lists.jboss.org/pipermail/hibernate-dev/2018-May/017739.html .

Guillaume Smet
July 11, 2018, 8:32 AM

Moving to 5.3.5 for now as it's not a regression. Will see if it can make it before that if all goes well.

Guillaume Smet
November 29, 2018, 10:13 AM

I integrated the original test in the PR here: https://github.com/hibernate/hibernate-orm/pull/2390

We need to decide if we still want to keep the UNFETCHED_PROPERTY code in the types or get rid of it and use the other approach (or both).

Gail Badner
December 18, 2018, 5:31 PM

Pushed to 5.3 branch as well.

Assignee

Guillaume Smet

Reporter

Niko Wittenbeck

Fix versions

Labels

None

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure