ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simone.trip...@gmail.com>
Subject Re: Mapper parsing problem
Date Thu, 04 Feb 2010 07:44:22 GMT
Hi all guys,
sorry but I explained my "2 cents idea" in the wrong way :P
Indeed, in my dreams, I'd completely _remove_ the #{} syntax, IMHO it
should be simpler reading a 100% pure XML SQL map like:

update ORDER_ENTRY.CONTACT
set
  DEPT_ID = <parameter name="deptId" javaType="String" jdbcType="VARCHAR" />
  STATE_ID = <parameter name="stateId" javaType="String" jdbcType="VARCHAR" />
  TIME_ZONE_ID = <parameter name="timeZoneId" javaType="String"
jdbcType="VARCHAR" />

instead of

update ORDER_ENTRY.CONTACT
set
  DEPT_ID = #{deptId, javaType=String, jdbcType=VARCHAR},
  STATE_ID = #{stateId, javaType=String, jdbcType=VARCHAR},
  TIME_ZONE_ID = #{timeZoneId, javaType=String, jdbcType=VARCHAR}

even if, of course, for a simpler case like:

insert into
    users (
        id,
        username,
        password)
values (
        <parameter name="id"/>,
        <parameter name="username"/>,
        <parameter name="password"/>
)

is much more verbose than:

insert into
    users (
        id,
        username,
        password)
values (
        #{id},
        #{username},
        #{password}
)

Thoughts?
All the best,
Simo

http://people.apache.org/~simonetripodi/



On Thu, Feb 4, 2010 at 2:20 AM, Daryl Stultz <daryl@6degrees.com> wrote:
>
> On Wed, Feb 3, 2010 at 7:38 PM, Guy Rouillier <guyr-ml1@burntmail.com>
> wrote:
>>
>> On 2/3/2010 3:54 PM, Daryl Stultz wrote:
>
>
>>>
>>> I like this idea, though to keep things consistent, I would just use
>>> "parameter" instead of "parameterDef".
>
> Right, I just made up parameterDef to indicate is was for defining the
> parameter rather than using it. I'm pretty new to iBATIS, so I haven't used
> <parameter> yet and didn't want to suggest an orthogonal usage of it.
> --
> Daryl Stultz
> _____________________________________
> 6 Degrees Software and Consulting, Inc.
> http://www.6degrees.com
> mailto:daryl@6degrees.com
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Mime
View raw message