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]
还是说这种关联查询只能全查出来?

一个hql查询语句,不知道出错的原因,大家帮忙看看
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
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]
把菊花拿掉本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报