String sql = "select marker_no AS markerNo,name from lv_marker";
String sqlMo = "select * from lv_marker";
//------------------------------------------------------------------------------
SQLQuery query = this.getSession().createSQLQuery(sql);
query.setResultTransformer(Transformers.aliasToBean(MarkerBfVO.class));// MarkerBfVO的属性值必须与sql的查询的字段名对应,可使用别名做对应
List<MarkerBfVO> resultsVO = query.list();
//------------------------------------------------------------------------------
SQLQuery queryMo = this.getSession().createSQLQuery(sqlMo).addEntity(Marker.class);// 存在找不到实体类的问题
List<Marker> resultsMo = queryMo.list();
//------------------------------------------------------------------------------
SQLQuery queryMap = this.getSession().createSQLQuery(sqlMo);
queryMap.setResultTransformer(CriteriaSpecification.ALIAS_TO_ENTITY_MAP);
List<Map<String,Object>> resultsMap = queryMap.list();
//------------------------------------------------------------------------------
SQLQuery queryObjs = this.getSession().createSQLQuery(sqlMo);
List<Object[]> resultsObjs = queryObjs.list();
return resultsVO;