This was actually a very serious consideration for us.  I personally like
this design a lot.

FWIW:  Parameter maps are in iBATIS 3, but the DTD disables the element.
Primary reason is that it still works exactly like iBATIS 2, which is not
based on named parameters as you've suggested.  Before adding it back, I
want to ensure that it works this way, but it's a bit of work to get it
there.

Clinton

On Wed, Feb 3, 2010 at 1:54 PM, Daryl Stultz <da...@6degrees.com> wrote:

>
>
> On Wed, Feb 3, 2010 at 3:32 PM, Simone Tripodi 
> <simone.trip...@gmail.com>wrote:
>
>> Forgot to say that, of course, there are cons, like in the sample below:
>>
>> I misread your first post and was thinking you wanted something like this:
>
> <insert id=”insertUser” parameterType=”User” >
>    <parameterDef name="department" mode="OUT" jdbcType="CURSOR" 
> javaType="Department"
> resultMap="departmentResultMap"/>
>     insert into users (id, username, password, department)
>     values (#{id}, #{username}, #{password}, #{department})
> </insert>
>
> I'm totally mixing your examples up, but the point is "parameterDef" just
> defines the nature of the parameter, #{department} just applies the value in
> the right spot. Maybe that's worse, I don't know!
>
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:da...@6degrees.com
>

Reply via email to