Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-331

Nested Result Mappings are Not Propogated to Extended Result Maps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.7
    • 2.2.0
    • Core
    • None
    • All

    Description

      Consider this result mapping:

      <resultMap id="animalWithAttributes" class="test.Animal" groupBy="id">
      <result property="id" column="animalId" />
      <result property="attributes" resultMap="animalAttributesMap"/>
      </resultMap>

      <resultMap id="extendedAnimalWithAttributes" class="test.AnimalWithType"
      extends="animalWithAttributes">
      <result property="type" column="animalType" />
      </resultMap>

      <resultMap id="animalAttributesMap" class="test.AnimalAttribute">
      <result property="attribute" column="attribute"/>
      </resultMap>

      In this scenario, the nested result map (animalAttributesMap) is not propogated to the extended resultMap (extendedAnimalWithAttributes). No errors are thrown at run time, but the property related to the nested result map will always be null.

      Attachments

        1. IBATIS-331.patch
          2 kB
          Jeff G. Butler

        Activity

          People

            jgbutler Jeff G. Butler
            jgbutler Jeff G. Butler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: