日期:2014-05-16  浏览次数:20440 次

用hql 进行连表查询时报错
我在项目中用了这样一个连表查询的语句:
String otherCommentHql = "from OtherComment a,TouristAttraction b where a.objectId=b.id and b.city like '%" + city + "%' order by a.createTime";
otherCommentList = otherCommentService.findList(otherCommentHql);


开头的时候报错,后来通过查询网上资料,在hibernate配置文件中配置了dialect属性,就不会报错了:
<property name="dialect">  
    com.hibernate.DialectForInkfish
</property>