yanyuening 2009-12-31 10:26
浏览 274
已采纳

一个hql查询语句,不知道出错的原因,大家帮忙看看

select t1.* from Tmodule t1,Tpermission t2 where t1.id=t2.modelId and t2.userId=1
类名,字段都没有错这点大家不用怀疑

关键错误信息:
org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '*' near line 1, column 11 [select t1.* from Tmodule t1,com.cube.housev2.pojo.Tpermission t2 where t1.id=t2.modelId and t2.userId=1]

还是说这种关联查询只能全查出来?

  • 写回答

2条回答 默认 最新

  • eyeqq 2009-12-31 10:31
    关注

    [code="java"]select t1 from Tmodule t1,Tpermission t2 where t1.id=t2.modelId and t2.userId=1
    [/code]
    把菊花拿掉

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?