ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Armstead" <jam...@A-t-g.com>
Subject Parameters mapping to same Property (.Net)
Date Thu, 17 Sep 2009 21:08:16 GMT
Why is iBatis built to only allow you to map a single column to a single


Say you have:


<parameter column="EnteredDt" property="EnteredDt">

<parameter column="OriginalEnteredDt" property="EnteredDt">


The EnteredDt get set right before Save because of a custom hook that
has been added in to set the Database time into the EnteredDt before
saving, so we want to use the EnteredDt property. Why would iBatis be
built to build 2 arrays with the property as the key? Making it
impossible to have a 2 columns mapped to the same property because the
keys conflict thus the the column array is larger than the property
array throwing a ArgumentOutOfRange Exception? 


Is there a way around this other than checking to see if
OriginalEnteredDt is empty and if it is then return EnteredDt?


View raw message