出错信息:
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]当 IDENTITY_INSERT 设置为 OFF 时,不能向表 'usertable' 中的标识列插入显式值。在sql server中,我的表主键id,设置了标识种子我的*.hbm.xml中, 这样设置的
<id name="id">
<generator class="identity" />
</id>
不知道什么原因?
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]当 IDENTITY_INSERT 设置为 OFF 时,不能向表 'usertable' 中的标识列插入显式值。在sql server中,我的表主键id,设置了标识种子我的*.hbm.xml中, 这样设置的
<id name="id">
<generator class="identity" />
</id>
不知道什么原因?
在程序中我也没有设置id的值啊,setId没有使用啊