Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
DataMapper 1.6.1
-
None
-
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.