随笔-51  评论-14  文章-0  trackbacks-0
在applicationContext.xml中加入如下代码:

  <property name="hibernateProperties">
   <props>
    <prop key="hibernate.dialect">
     org.hibernate.dialect.SQLServerDialect
    </prop>
    <prop key="hibernate.query.factory_class">
     org.hibernate.hql.classic.ClassicQueryTranslatorFactory
    </prop>
   </props>
  </property>

HQL语句:

String hql = "from Cheliang as t where t.cpHaoma like '"+cpHaoma+"'";
posted on 2008-04-07 13:08 Hank1026 阅读(257) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: