就是例如 String hql="select from deptNo ,deptName from Dept';
Query query =session.createQuery(hql);
List<Objet[] > list=query.list();
for(Object[] d:list){
System.out.println(Object[0]+" "+Object[1);
}
因为只有用Object[] 数值存期两个属性,才能查询到结果
就是例如 String hql="select from deptNo ,deptName from Dept';
Query query =session.createQuery(hql);
List<Objet[] > list=query.list();
for(Object[] d:list){
System.out.println(Object[0]+" "+Object[1);
}
因为只有用Object[] 数值存期两个属性,才能查询到结果