hibernate报错缺少表达式

三张主表〔用户表,角色表,模块表〕
两张关联表〔用户——角色〕〔角色——模块〕
我是用hibernate打的,实体类中使用注解配置的
查询登录用户角色相对应的模块信息,
hql:"select m from Module m, Users u where m.roles = u.roles and u.id = ?"
运行执行报缺少表达式错误???搞不明白

把完整的报错信息 和 HQL 贴出来
然后再分析一下

select m.*  from Module m, Users u where m.roles = u.roles and u.id = ?

已经解决了
hql语句写错错了
select m from Module m inner join m.roles r inner join r.users u where u.id = ?