
org.hibernate.query 中的setInteger()函数是什么意思,它的每个参数都代表什么
展开全部
第一个参数表示对应第几个参数
第二个参数表示具体的值
比如:from table1 where userId=? and userpass=?
这个hql需要两个参数
query.setInteger(0,1001);//给userId传递参数
query.setString(1,"abc");//给userpass传递参数
第二个参数表示具体的值
比如:from table1 where userId=? and userpass=?
这个hql需要两个参数
query.setInteger(0,1001);//给userId传递参数
query.setString(1,"abc");//给userpass传递参数
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |