Actually, the easiest way to handle the same thing is to put both parameters into a Map (HashMap works nicely), and pass the Map as the single parameter that iBATIS methods take.

Hope This Helps,

Jeff Stahl

NathanM wrote:
Please excuse me if this turns out to be a dumb question.
Is it possible to do something simple like pass two int parameters into a
statement?

These are the examples I see in the manual:

One simple type:

<statement id="getProduct" parameterClass="System.Int32">
  select * from PRODUCT where PRD_ID = #value#
</statement>

One complex type:

<parameterMap id="insert-product-param" class="Product">
  <parameter property="description" />
  <parameter property="id"/>
</parameterMap>

<statement id="insertProduct" parameterMap="insert-product-param">
  insert into PRODUCT (PRD_DESCRIPTION, PRD_ID) values (?,?);
</statement>

One complex type inline:
<statement id="insertProduct" parameterClass="Product">
  insert into PRODUCT (PRD_ID, PRD_DESCRIPTION)
  values (#id:int#, #description:VarChar#)
</statement>

Is there any example for two simple types? Or do I need to come up with a
class that has two int properties so I can pass int two ints?


Nathan

Reply via email to