在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) 編輯 收藏