Like Jeff said, no, but you could either just allow null values into your object.  Or if you have two or three different variation of fields coming back then you can use the extending method.  But if you really need the flexibility of being able to handle any permutation then perhaps use a HashMap or a maybe even a custom type handler.

Mark

On 1/26/06, Rick Gray <[EMAIL PROTECTED]> wrote:
Mark, I need to know if i can build dynamic result maps and dynamic parameter maps using the <dynamic> element like you can in the statement.  In other words can i use the <dynamic>, <IsNotNull> and other dynamic elements in the result and parameter maps? The section of code below was taken from the dynamic statement example in the manual.
 
<dynamic prepend="
WHERE ">
<isNotNull prepend="AND" property="firstName">
(ACC_FIRST_NAME = #firstName#
<isNotNull prepend="
OR" property="lastName">
ACC_LAST_NAME = #lastName#
</isNotNull>
)
</isNotNull>
<isNotNull prepend="
AND" property="emailAddress">
ACC_EMAIL like #emailAddress#
</isNotNull>
<isGreaterThan prepend="
AND" property="id" compareValue="0">
ACC_ID = #id#
</isGreaterThan>
</dynamic>
 


Mark Bennett <[EMAIL PROTECTED]> wrote:
You can extend resultmaps which allow you to factor similar fields but allow special handling for separate fields.

<resultMap id="myResult" extends="BaseMap" class="myClass">
        <result property="special" column="specialCol" select=" Namespace.getFromSomeWhere"/>
</resultMap>

Mark


On 1/25/06, Rick Gray <[EMAIL PROTECTED] > wrote:
Hi,
 
I'm evaluating IBATIS for use in our project. I need to know if I can use <dynamic> elements in the ParameterMaps and ResultMaps. I want to keep the parameters and results in sync with the statement.
 
Thanks
 
Rick 
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


Reply via email to