title: Nested ResultMaps with ambiguous database columns
body: <p>I have a couple of nested ResultMaps in iBatis that have exactly same database column names. This is causing ambiguity and resulting in incorrect result being retrieved for the different database tables.</p>
  
  <p>For e.g.,
  `</p>
  
  <pre><code>&lt;sql namespace="Shipment"&gt;
  
         &lt;resultMap id="consignment" class="com.model.Consignment"&gt;
                &lt;result property="consignmentId" column="Consignment_cd" /&gt;
                &lt;result property="shipmentCd" column="Shipment_cd" /&gt;
                &lt;result property="shipmentUnit" column="Shipment_Unit" /&gt;
                &lt;result property="location"  resultMap="Shipment.size" /&gt;
         &lt;/resultMap&gt;
  
        &lt;resultMap id="size" class="com.model.Size"&gt;
                &lt;result property="consignmentId" column="Consignment_cd" /&gt;
                &lt;result property="shipmentCd" column="Shipment_cd" /&gt;
                &lt;result property="shipmentUnit" column="Shipment_Unit" /&gt;
        &lt;/resultMap&gt;
  
      &lt;/sql&gt;
  </code></pre>
  
  <p>`</p>
  
  <p>Now when I write my select query joining the Size &amp; Consignment tables, I get the same values for Shipment Code and Shipment Unit returned, whereas there are different values for these two columns in the database. Please note that I need both the Shipment Code and Unit from both the Size and Consignment levels pulled up in a single query.</p>
  
  <p>Could someone help me solve this problem?</p>