Hibernate5.0 EntityManager转SqlQuery并返回Map结果集
Query query = entityManager.createNativeQuery("select * from message");
query.unwrap(org.hibernate.SQLQuery.class)
.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
List<Map<String, Object>> list = query.getResultList()