I'm using Hibernate 4.2.3 and I have a class similar to the following:
@Entity
@DynamicInsert
@DynamicUpdate
@SelectBeforeUpdate
public class Test {
@Id
private BigInteger theId;
@Lob
@Basic(fetch = FetchType.LAZY)
@JsonIgnore
private Blob data;
@Lob
@Basic(fetch = FetchType.LAZY)
@JsonIgnore
private Blob otherData;
// Getters and setters....
}
The sql that this is generating for an update includes the data
column, even though it hasn't changed. (To be precise, what I do is get the object, detach it, read the data
and use that to generate otherData
, set that and then call saveOrUpdate
on the session.)
Can anyone explain why this would happen? Does this functionality work with Blobs? I've searched for documentation but found none.
PS I'm not using @DynamicUpdate for performance reasons. I know that it would be questionable to use it from that standpoint.