原因:hibernate项目中在学生表的配置文件中:
<id name="studentno" column="studentno"> <generator class="native"></generator> </id>
将主键设置为了自动增长的类型,但是数据库创建表的时候却将数据类型设置成了vchar类型,这怎么实现++操作呢?
将学号(主键)设置为int类型,问题得到了成功解决:
The database returned no natively generated identity value错误解决方案
原文:https://www.cnblogs.com/zhai1997/p/11797439.html