Hi every one, I have this code
@Entity
@Table(name = "picture")
public class Picture implements Serializable {
@Id
@Column(name = "id")
@GeneratedValue
private int id;
@Column(name = "format", length = 8)
private String format;
@Basic(fetch = FetchType.LAZY)
@Column(name = "context", nullable = true, columnDefinition="mediumblob")
@Lob
private java.sql.Blob myBlobAttribute; // protected accessor and modifier
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "branch_fk", referencedColumnName = "id", nullable = false)
private Branch branch;
//Some setter and getter
I use netbeans 6.7 and in this Ide it show me error on line (private java.sql.Blob myBlobAttribute;)
but code run and it's make picture table on my database!
is it a real error or just e notification and how must I solve it?
error message was:
basic attributes can only be of the following types: java primitive types,wrapper of primitive types, String, java.math.bigInteger, java.math.BigDecimal, java,util.Date, java.util.Calendar, java.sql.Data, java.sql.TimeStamp, byte[], Byte[], char[], Character[], enums, or any Serializable type