我想用hibernate来取出某个sequence的nextval我的代码如下:List<Long> list = session.createQuery("select Sequence_user.nextval from dual").list();这是错误的!!它运行的时候会报dual is not mapped [select Sequence_user.nextval from dual]谁知道怎么做吗??我在线等……立马结贴!!谢谢各位!!
解决方案 »
- JpaTemplate remove出现问题,请指教
- 这个内存溢出咋办
- 实体Bean的ID能自定义吗?
- Spring+Hibernate这是我的配置文件!但是错误显示JNDI有问题!技术菜也讲不清楚!希望有人能解决吧!
- WebSphere运行时javax.xml.rpc.ServiceException
- weblogic9.0怎么配置成服务器呀?
- java.sql.SQLException: 调用中的无效参数DSRA0010E: SQL State = null, Error Code = 17,068
- ejb中relationship的问题,高手请进
- 求救!关于在struts中的tiles问题
- 求各位朋友帮忙指点
- HQL多表查询问题
- 使用ant build 无法undeploy,返回了页面的html代码
Integer maxId = (Integer)(session.createSQLQuery(sql).addScalar("nextvalue", Hibernate.INTEGER) ).uniqueResult();