怎么获得Hibernate原生sql返回结果list 的值
Listlist=SessionFactoryUtil.openSession().createSQLQuery("SELECTodr_id,odr_customer,o...
List list = SessionFactoryUtil.openSession()
.createSQLQuery("SELECT odr_id,odr_customer,odr_date,odr_addr,odr_status FROM orders")
.addScalar("odr_id",Hibernate.BIG_INTEGER)
.addScalar("odr_customer",Hibernate.STRING)
.addScalar("odr_date",Hibernate.DATE)
.addScalar("odr_addr", Hibernate.STRING)
.addScalar("odr_status", Hibernate.STRING).list(); 展开
.createSQLQuery("SELECT odr_id,odr_customer,odr_date,odr_addr,odr_status FROM orders")
.addScalar("odr_id",Hibernate.BIG_INTEGER)
.addScalar("odr_customer",Hibernate.STRING)
.addScalar("odr_date",Hibernate.DATE)
.addScalar("odr_addr", Hibernate.STRING)
.addScalar("odr_status", Hibernate.STRING).list(); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询