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
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.
I posted something on the list regarding this issue: http://lists.jboss.org/pipermail/hibernate-dev/2018-May/017739.html .
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.
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).
Pushed to 5.3 branch as well.