Ok I will look at it. But in the Menu class I don't store role_id, I think that is the problem. From a menu I'm always getting all the children and not only the children with the appropriate roles.
It would be good to get the whole Menustructure when calling UserRole.getMenus(). I mean the whole tree, and then when I call menu.getChildren() then no sql will be executed but the previously results would be used. So without hibernate I would do it in that way I think: building the menustructure(tree) in advance from the role. Maybe it is possible also with hibernate?
Or Should I create the menu class from the menu_rights and menu tables (Maybe join in the hibernate-mapping?) so that I always have the role_id in the Menu class?
max wrote:
look at h3 filters