It does work with parameterMaps. I have a test case working now:
<parameterMap id="insertParameterMap" class="test.Animal">
<parameter property="id"/>
<parameter property="type"/>
</parameterMap>
<parameter property="id"/>
<parameter property="type"/>
</parameterMap>
<insert id="insertWithSelectKey" parameterMap="insertParameterMap">
<selectKey keyProperty="id">
select max(animalId) + 1 from Animal
</selectKey>
insert into Animal (animalId, animalType) values(?, ?)
</insert>
I don't know why this is different from what you're doing. Are you on a pretty recent version of iBATIS? I'm testing against 2.2.0. The only thing I noticed wierd in your map was different data types (long and DECIMAL). But it seems like you would be getting an Exception if that was the problem.
Jeff Butler
On 8/17/06, jaybytez <[EMAIL PROTECTED]> wrote:
So does selectKey only work with parameterClass?
I have tried a million different configurations and cannot get selectKey and
parameterMap to work.
Thanks for your help!
jay
--
View this message in context: http://www.nabble.com/selectKey-and-parameterMap-issue-tf2118776.html#a5853887
Sent from the iBATIS - User - Java forum at Nabble.com.
