在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 阅读(256)
评论(0) 编辑 收藏