Can A Lob byte[] value be updated?

Test case at https://github.com/jasonparallel/hibernate-test-case-templates/blob/update-lob/orm/hibernate-orm-4/src/test/java/org/hibernate/bugs/JPAUnitTestCase.java

With a model object containing (https://github.com/jasonparallel/hibernate-test-case-templates/blob/update-lob/orm/hibernate-orm-4/src/main/java/org/hibernate/bugs/Image.java)

@Lob
@Basic( fetch = FetchType.LAZY )
private byte[] content;

I’m trying to update the value via .setContent(new byte[] {1, 2, 3, 4}); but the old value remains when the object is retrieved again.

I noticed you used Hibernate 4. You should use Hibernate 5.3 and if it doesn’t work open a Jira issue and attach the test case.

It was a bug in 5.2.16 that was fixed in 5.2.17