当 IDENTITY_Insert 设立为 OFF 时,不能向表 'USERS' 中的标识列插入显式值

当 IDENTITY_Insert 设置为 OFF 时,不能向表 USERS 中的标识列插入显式值程序代码id nameoid type

当 IDENTITY_Insert 设置为 OFF 时,不能向表 'USERS' 中的标识列插入显式值

程序代码<id name="oid" type="java.lang.Integer">
????<column name="oid" />
????<generator />
</id>
上述配置将使Hiberanate抛错:"当 IDENTITY_Insert 设置为 OFF 时,不能向表 '[USER]' 中的标识列插入显式值"
需要将该段设置为如下:

程序代码<id name="oid" type="java.lang.Integer">
????<column name="oid" />
????<generator />
</id>