org.hibernate.hql.ast.QuerySyntaxException: unexpected token: group near line 1, column 130 [select count(*) from com.huilan.easysso.model.Group g where g.id in(select group.id from com.huilan.easysso.model.User user join group.groupUsers gu where gu.id=1751)] 

解决方案 »

  1.   

    http://hi.baidu.com/liuspring/blog/item/3262938257ae9094f703a64e.html/cmtid/2f3a61f0079363cf7831aa4c看看是否有人家说得三种问题。
      

  2.   

    unexpected token: group near line 1, column 130
      

  3.   

    上面的解决办法都试过了
    好像不是那个问题
    String hql ="select g from Group g where g.id in(select group.id from User user join group.groupUsers gu where gu.id="+userid+")";
    sql语句是这么写的
      

  4.   

    楼主这个sql   group.groupUsers gu 这个地方 我不是特别明白 是什么意思 可以说下 还有  group 是在哪起的别名吗?
      

  5.   

    对呀,你的group.id,group.groupUsers中的group没见你定义的地方