Hibernate Delete Error: Batch Update Returned Unexpected Row Count

前端 未结 8 1772
余生分开走
余生分开走 2020-12-04 16:44

I wrote this method below that is suppose to delete a member record from the database. But when I use it in my servlet it returns an error.

MemberDao Class

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-04 17:27

    this is the solution for my case, maybe it will help you!

    Actually it was a conversion problem between a database field type (timestamp on postgreSQL) and his equivalent property type (Calendar) on hibernate xml file. When Hibernate did this update request, it didn't retrieve the row because the request interrogate with a bad convert Calendar value. So I simply replaced property type "Calendar" in "Date" in Hibernate xml file and the problem was fixed.

提交回复
热议问题