Hi,
In my model class (Article.java as given below), I have got a field (fileData) which contains uploaded image information. I dont want to save it in database (instead on file system) and thus i dont have corresponding column in the table. I am getting hibernate error which is quite correct.
My query is how can i handle this situation. I want to have a column in my @Entity persistent class which i dont want to save in database but only use in the controller.
@Entity
@Table(name = "article")
public class Article {
@Id
@GeneratedValue
@Column(name = "article_id")
private Long articleId;
@Column(name = "article_name", nullable = false, length=20)
private
String articleName;
@Column(name = "article_desc", nullable = false)
private String articleDesc;
@Column(name = "date_added")
private Date addedDate;
//To be saved on file system
private CommonsMultipartFile fileData;