How to keep a variable in Model class that you dont want to save in DB? Spring-Hibernate example
posted 5 years ago
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.