标签:bsp 返回 lis alias ssi hibernate nbsp for ber
1.Query query = session.createSQLQuery("SQL").addEntity(Tree.class); //返回对象
List list = query.list();
2.Query query = session.createSQLQuery("SQL").setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); //返回一个map,KEY:为DB中名称一致;
Map map = (Map)list.get[i];
map.get("id");map.get("name");
标签:bsp 返回 lis alias ssi hibernate nbsp for ber
原文地址:http://www.cnblogs.com/yanjunwu/p/6065134.html