Doing a 1:1 query with IBATIS 2.2.0, I am using an inner resultMap to fetch an object. Does anyone know why I am forced to prefix the resultMap with the namespace? The example in the Developer Guide (p. 36) does not have it that way.

  <resultMap id="roleMap" class="Role">
    <result property="value" column="ur_id" />
  </resultMap>

  <resultMap id="userMap" class="User" groupBy="id">
    <result property="id" column="u_id" />
    <result property="roles" resultMap="User.roleMap" />
  </resultMap>

PS: Clinton, I believe a good enhancement to retrieving a collection of primitives or enums (like above), would be to allow a shortcut as follows:

  <resultMap id="userMap" class="User" groupBy="id">
    ...
    <result property="roles" column="ur_id" resultClass="Role" />
  </resultMap>

Paul

Reply via email to