I am getting \" org.hibernate.PropertyAccessException\" due to null values in my database table. How to handle the exception?
My files are
FetchTest.java
I would personally recommend to actually "clean" the database values, maybe setting the column not nullable.
But if this can't be done, what you can do is modify your setters, so that it checks for null
:
public void setComm(Double comm) {
if(null != comm){
this.comm = comm;
}else{
this.comm = 0;
}
}
hope this helps