SessionFactory sf=hibernateTemplate.getSessionFactory();
Session session=sf.openSession();
Query query = session.createSQLQuery(sql);

执行原生SQL

但是相对于HQL,查出的数据不是对应于po类。