高手请进~菜鸟问题!~
S2SH整合项目中,执行保存方法的时候报错,怎么解决?页面错误信息:
The server encountered an internal error () that prevented it from fulfilling this request.
org.springframework.dao.InvalidDataAccessResourceUsageException: could not get next sequence value; nested exception is org.hibernate.exception.SQLGrammarException: could not get next sequence value
后台输出的SQL语句是:
select r_role.nextval from dual
复制了SQL语句后在数据库中执行加个sequesce序列名:select s_r_role.nextval from dual
就能查找到数据,请问怎么修改?
ID是这样设置的:
<id name="roleId" type="java.lang.Integer">
<column name="role_id" precision="20" scale="0"/>
<generator class="sequence" >
<param name ="sequence">r_role</param>
</generator>
</id> --------------------编程问答-------------------- 你保存roleId是自动增长的,不用去获取下一个序列值. --------------------编程问答-------------------- 没看明白 --------------------编程问答-------------------- 错误信息完整一点 --------------------编程问答-------------------- 没看懂..
补充:Java , Web 开发