dual is not mapped,select ordercode_seq_id.nextval nextvalue from dual
来源:互联网 发布:曾经的网络流行语 编辑:程序博客网 时间:2024/05/12 00:32
项目中,用到一个序列作单号,框架用的是ssh,在dao层去拿的时候,运行时报错为dual is not mapped,[select ordercode_seq_id.nextval nextvalue from dual]
后来检查发现,获取方式不对,于是改成下面这样,就可以正常获取了
- public String getOrderCode() {
- try {
- String sql = "select ordercode_seq_id.nextval nextvalue from dual";
- Integer maxId = (Integer)(this.getSession().createSQLQuery(sql).addScalar("nextvalue", Hibernate.INTEGER) ).uniqueResult();
- return maxId.toString();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
- dual is not mapped,select ordercode_seq_id.nextval nextvalue from dual
- dual is not mapped,select ordercode_seq_id.nextval nextvalue from dual
- select hibernate_sequence.nextval from dual
- Hibernate: select hibernate_sequence.nextval from dual
- Oracle中select SEQ_YX.nextval from dual是什么意思
- select * from dual
- select * from dual;
- select sysdate from dual
- select * from dual
- select 1 from dual
- select * from dual
- select * from dual
- select userenv("language") from dual
- select * from dual (转)
- select userenv('language') from dual
- sql dual nextval
- 使用 ssh框架 hibernate的save(entity)时执行到select hibernate_sequence.nextval from dual 就停了
- pl-sql中select * from dual 这个dual是什么
- iOS单例模式的实现
- 软件随想录(local.joelonsoftware.com/wiki)-2001年05月05日 这个国家的狗做什么工作? - What Is the Work of Dogs in this Cou
- 产品经理们最需要理解的3种方式
- NSBundle的使用
- Sicily 1140 国王的遗产
- dual is not mapped,select ordercode_seq_id.nextval nextvalue from dual
- kindeditor编辑器 的使用方法!
- 简单备份
- HDU 2500 做一个正气的杭电人
- IPHONE多语言
- 注册表学习——取消windows7的智能窗口排列
- ACE Service Configurator的入门
- UIVIEW圆角
- Oracle恢复实验(一)