I went on with my application, but now i really need to solve this problem.
I have searched deeper and what i discovered is that Hibernate doesn't call the getter for my attribute.
Inside my entity Content i have this code.
Code:
@Column(name = "CONTENT")
@Basic(fetch=FetchType.LAZY)
private Blob contentBlob;
public Blob getContentBlob() {
return contentBlob;
}
public void setContentBlob(Blob contentBlob) {
this.contentBlob = contentBlob;
}
When my application call the method
Code:
public void save(Content content) {
if (content.getId() == null) {
entityManager.persist(content);
} else {
entityManager.merge(content);
}
}
the merge doesn't call the getter...but the funny thing is that the insert work perfectly and even in that case the getter is never called.
So i think i'm missing something, or maybe my debugger does.
How Hibernate access that value??