I have a field that is mapped as follows:
@Column(name = "picture")
private Byte picture;
When retrieving the entity with a regular session.load() or criteria.list(), upon session flush, an update statement is issued for the field.
In an interceptor, I can see in the onFlushDirty method that the byte arrays in the currentState en previousState parameters are different objects, but with the same byte-content. All the other objects in currentState and previousState are identical.
My guess is that this causes Hibernate to think the contents of the field changed?
This behavior did not happen in 3.5.5-Final, and because the entity is versioned, upon each retrieval, the version field is incremented, which is highly undesirable.
Hibernate 3.6.0.Final, Oracle 11g