role.setMenus(sysMenus); dao.clearLinks(role,"menus");
上面代码,会执行:delete from sys_role_menu where sys_role_id = 1
我想要的是:delete from sys_role_menu where sys_role_id = 1 and sys_menu_id = 2
直接
dao.clear("sys_role_menu", Cnd.where("sys_role_id", "=", 1).and("sys_menu_id", "=", 2));
谢谢了