Hibernate 3.2: Transformers for HQL and SQL:
[url]http://swik.net/Hibernate/Hibernate+GroupBlog/Hibernate+3.2:+Transformers+for+HQL+and+SQL/cmxs[/url][quote]待读[/quote]
啥也不说了,真好用啊。
[url]http://swik.net/Hibernate/Hibernate+GroupBlog/Hibernate+3.2:+Transformers+for+HQL+and+SQL/cmxs[/url][quote]待读[/quote]
啥也不说了,真好用啊。
String sql = "select r.id as id,r.account_name as accountName,r.name as name from T_REGIINFO r where DEL_STATUS='0' and IS_ADMIN='1' ORDER BY CONVERT (NAME USING gbk) ASC";
return this.getHibernateGenericController().getSessionFactory()
.getCurrentSession().createSQLQuery(sql).setResultTransformer(Transformers.aliasToBean(UserInfo.class)).list();