日期:2014-05-17 浏览次数:20905 次
Map datas = (Map)session.createSQLQuery("select id,name from user where name='zhangsan'").addScalar("username",Hibernate.INTEGER).setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP); map.get("id"); map.get("name");