我在项目中用了这样一个连表查询的语句:
开头的时候报错,后来通过查询网上资料,在hibernate配置文件中配置了dialect属性,就不会报错了:
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>