Session session = HibernateSessionFactory.getSession();
String hql = " update com.bean.Firstcontact set del=1 where gsid=:gs";
Query query = session.createQuery(hql);
query.setLong("gs",gsi);
query.executeUpdate();
这是我的hql语句的代码gsi能穿过来了。。但是测试报的错误是:
QueryImpl( update com.bean.Firstcontact set del=1 where gsid=:gsi)
Hibernate: update firstcontact set DEL=1 where GSID=?请教高手如何实现给那个gsid赋值?
query.setLong这得问题。
String hql = " update com.bean.Firstcontact set del=1 where gsid=:gs";
Query query = session.createQuery(hql);
query.setLong("gs",gsi);
query.executeUpdate();
这是我的hql语句的代码gsi能穿过来了。。但是测试报的错误是:
QueryImpl( update com.bean.Firstcontact set del=1 where gsid=:gsi)
Hibernate: update firstcontact set DEL=1 where GSID=?请教高手如何实现给那个gsid赋值?
query.setLong这得问题。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货