You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Jakub Scheibe <ja...@gmail.com> on 2006/11/28 12:12:29 UTC
Dynamic ResultMaps
Hi,
Is there any way to create dynamic resultmaps?
In this moment i'm preparing dynamic sql statement but I don't know how to
prepare dynamic resultmap
Here is how i'm doing this:
<select id="Select" parameterclass="MyClass" resultmap="MyResMap">
select
<dynamic>
<isEqual property="Id" compareValue="1">
ID
</isEqual>
<isEqual property="Name" compareValue="true" prepend=",">
NAME
</isEqual>
</dynamic>
from MYTBL
</select>
if I use following resultmap it working ok but i need to use both Id and
Name in Select
<resultMap id="MyResMap">
<result property="Id" column="ID"/>
<result property="Name" column="Name"/>
</resultMap>
Regards,
Jakub