this work for my
Code:
<resultMap id="mapGetNotMenu" class="cl.sf.dto.NotMenuDTO">
<result column="ID_MENU" property="id_menu" jdbcType="INTEGER" columnIndex="1" />
<result column="SUBMENU" property="padre" jdbcType="INTEGER" columnIndex="2" />
<result column="TEXTO" property="nombre" jdbcType="VARCHAR" columnIndex="3" />
</resultMap>
and the query
Code:
<select id="getNoMenusByRol" resultMap="mapGetNotMenu" >
SELECT
DISTINCT menu.ID_MENU,menu.SUBMENU,menu.TEXTO
FROM
safetower.menu_rol
INNER JOIN safetower.menu ON (menu_rol.ID_MENU = menu.ID_MENU)
where menu.ID_MENU not in(
SELECT menu.ID_MENU
FROM
safetower.menu_rol
INNER JOIN safetower.menu ON (menu_rol.ID_MENU = menu.ID_MENU)
where id_rol =#idrol#)
</select>
I hope this help works for you