没有心思看这么多的代码,
不过如果是要用HQL进行符合主键的查询。那么这样就可以。
from RoleFunctionBO where RoleFunctionBO.RoleFunctionBOKey.roleId='条件'
这样就可以的。