public UserInfo queryNumber(String name) {
// TODO Auto-generated method stub
String sql="select user-info.*,buyer-in.*from user-info a left outer join buyer-in b on user-info.buyerid=buyer-in.buyerid where a.Aname=?";
SQLQuery query = sessionFactory.getCurrentSession().createSQLQuery(sql);
query.setString(0, name);
query.addEntity(UserInfo.class);
List list=query.list();
list=query.list();
return list;
我想把查询结果返回到个结果集,现在报错不同类型无法转换cannotmatch
求修改