code for my mapping is:
<mapping class="candidate.UserResume" />
and my UserResume class is below:
package candidate;
import java.sql.Blob;
import org.hibernate.annotations.*;
import javax.persistence.Column;
import javax.persistence.Lob;
import javax.persistence.Table;
@Entity
@Table(name = "user_resume")
public class UserResume {
private String resumeId;
private Blob resumeBlob;
private String userId;
@Column(name = "resume_blob")
@Lob
public Blob getResumeBlob() {
return resumeBlob;
}
public void setResumeBlob(Blob resumeBlob) {
this.resumeBlob = resumeBlob;
}
@Column(name = "resume_id", unique = true, nullable = false, insertable = true, updatable = false)
public String getResumeId() {
return resumeId;
}
public void setResumeId(String resumeId) {
this.resumeId = resumeId;
}
@Column(name = "user_id", unique = true, nullable = false, insertable = true, updatable = false)
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
}
|