`
zhuojb
  • 浏览: 91850 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

用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>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics