How to handle database null values in Hibernate Application?

前端 未结 3 1003
长情又很酷
长情又很酷 2021-01-21 05:54

I am getting \" org.hibernate.PropertyAccessException\" due to null values in my database table. How to handle the exception?

My files are

FetchTest.java

3条回答
  •  春和景丽
    2021-01-21 06:22

    Your mgr-Property is int, which does not allow null. Change it to Integer, which allows null. Or make a default value for your mgr column.

提交回复
热议问题