jpa程序,訪問報錯:
org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of com.surfront.meepao.pojo.GamePlayer.score; nested exception is javax.persistence.PersistenceException:
原因如下:
在pojo類GamePlayer中,某int類型的字段score,在數據庫中的數據為null。
解決辦法:
修改int為其包裝類型Integer。