hibernate,我用createSQLQuery返回list对象,遍历打印到控制台后输出“[Ljava.lang.Object;@1f72eaa2”
Stringsql="select*frommember";Listresult=session.getSession().createQuery(sql).list()...
String sql = "select * from member";
List result = session.getSession().createQuery(sql).list();
Iterator it = result.iterator();
while(it.hasNext()){
System.out.println(it.next());
} 展开
List result = session.getSession().createQuery(sql).list();
Iterator it = result.iterator();
while(it.hasNext()){
System.out.println(it.next());
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询