标签:查询 nbsp logs ati style column sql object blog
NativeQuery<Order> sqlQuery = session.createNativeQuery("select * from t_order", Order.class); List<Order> list = sqlQuery.list();
for(Order order : list) { System.out.println(order); }
SQLQuery sqlQuery = session.createSQLQuery("select * from t_order"); sqlQuery.addEntity(Order.class);
List<Order> list = sqlQuery.list();
SQLQuery sqlQuery = session.createSQLQuery("select * from t_order"); List<Object[]> list = sqlQuery.list();
for(Object[] order : list) { for(Object column : order) {
System.out.print(column); System.out.print(" "); } System.out.println(); }
标签:查询 nbsp logs ati style column sql object blog
原文地址:http://www.cnblogs.com/roxy/p/7611786.html