The database returned no natively generated identity value

Posted zq-kjy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了The database returned no natively generated identity value相关的知识,希望对你有一定的参考价值。

database returned no natively generated 分类:Hibernatehbm.xml中的配置如下:

<id name="id">
<generator class="native"/>
</id>

 

出现一个粗心的小问题:

native的功能是:

由数据库从identity,sequence和hilo中选取一个生成器来生成ID。

这样在建数据库中的表结构时就需要主键设置成自增长的(auto_increment)!!!! 

 



以上是关于The database returned no natively generated identity value的主要内容,如果未能解决你的问题,请参考以下文章

Can't connect to database with error (HY000/2002): No connection could be made because the target ma

Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.

There is no PasswordEncoder mapped for the id "null"

1317. Convert Integer to the Sum of Two No-Zero Integers

LeetCode --- 1317. Convert Integer to the Sum of Two No-Zero Integers 解题报告

LeetCode --- 1317. Convert Integer to the Sum of Two No-Zero Integers 解题报告