Uploaded image for project: 'iBatis for .NET'
  1. iBatis for .NET
  2. IBATISNET-284

Ability to reuse the same resultMap for different column names

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • DataMapper 1.6.1
    • None
    • DataMapper
    • None

    Description

      It would be nice (if there isn't a way already) to be able to reuse the same resultMap more than once for a given query. Something like the following:

      <resultMap id="foo" class="Foo">
      <result property="Bar" column="bar" />
      </resultMap>

      <resultMap id="fizz"class="Fizz">
      <result property="Foo1" column="bar=bar1" resultMapping="foo" />
      <result property="Foo2" column="bar=bar2" resultMapping="foo" />
      <result property="Foo3" column="bar=bar3" resultMapping="foo" />
      </resultMap>

      <statement id="selectFizz" resultMap="fizz">
      SELECT bar1, bar2, bar3 FROM FIZZ
      </statement>

      I'm using the syntax for composite keys here, but for a resultMapping instead of a select.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrewg Andrew Gniadek
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: