Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 70835 invoked from network); 4 Feb 2010 16:03:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2010 16:03:52 -0000 Received: (qmail 70064 invoked by uid 500); 4 Feb 2010 16:03:51 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 70036 invoked by uid 500); 4 Feb 2010 16:03:51 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 70028 invoked by uid 99); 4 Feb 2010 16:03:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 16:03:51 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of marco.speranza79@gmail.com designates 74.125.82.53 as permitted sender) Received: from [74.125.82.53] (HELO mail-ww0-f53.google.com) (74.125.82.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Feb 2010 16:03:41 +0000 Received: by wwc33 with SMTP id 33so276021wwc.12 for ; Thu, 04 Feb 2010 08:03:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type; bh=+tYFPJkKfKxkJOIdkeNo7k12wRMLXVcc8gSEbeIzhgc=; b=V+42g0/cgFBFDiQ/gSuS7zYakRKS7R5Ohg7oM8CheWmFuEGXbcOHKhRGRFibd51bJJ s1np1j7xyl6UxZ5Gnd+55wgkntIS4Ri2/Gz89o5yUeL6gSu8G2ik9KwpJ4+0/NU8Pl1H xOR2dIaJAtRgMPYYapf+J3G6LashxjWL2LWTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=I2dxTc0Ttu1FcGSX7HYwZS2hhRrt+QDV7DI1xkZg18MvTp3ezxby61DIVRZLaGJj0X Xsfojs+fzzUF8IN6Xmx1VyyIgoQ5/HiexNDUko7XVK6bGZl4SIu6BnFWxJXbuMThopFy F8OHKqcqgxgfPlp01uaAGn7yS7UyuXYycg5IQ= MIME-Version: 1.0 Received: by 10.216.89.84 with SMTP id b62mr732370wef.227.1265299401275; Thu, 04 Feb 2010 08:03:21 -0800 (PST) In-Reply-To: <16178eb11002040746j3db531d1ve6bef4f9774a2fc0@mail.gmail.com> References: <81cfe9551002020613n4fabb9e9ha824154762df2b9b@mail.gmail.com> <4173dc211002031219g418b4320tbc46e3fb8c872930@mail.gmail.com> <4173dc211002031232w3e112087i14e58d2c99a4063c@mail.gmail.com> <4B6A16FA.6070101@burntmail.com> <4173dc211002032344x46047a52y4eb792851be50917@mail.gmail.com> <16178eb11002040722s460400c4u76d81c66782d9dea@mail.gmail.com> <4173dc211002040742t6b4fc2d5h56978e308ba7c75a@mail.gmail.com> <16178eb11002040746j3db531d1ve6bef4f9774a2fc0@mail.gmail.com> From: Marco Speranza Date: Thu, 4 Feb 2010 17:03:01 +0100 Message-ID: <81cfe9551002040803x3c003d4am746d4650545f7c2f@mail.gmail.com> Subject: Re: Mapper parsing problem To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=0016e6d9710258fc4b047ec879ec X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d9710258fc4b047ec879ec Content-Type: text/plain; charset=ISO-8859-1 Hi Clinton, So if the #{} syntax will never be removed we have to fix the little line-break problem, because an XML file should not be "formatting-sensitive". Moreover yesterday night I made a simple test-case that reproduces the example wrote in the iBatis manual (page 26), and the parser raises a BuilderException (Improper inline parameter map format. Should be: #{propName,attr1=val1,attr2=val2}). So if your intention is maintaining this syntax, and you're open to fix this problem, I can submit through Jira the patch needed I mentioned mails ago in the same thread. What do you think? 2010/2/4 Clinton Begin > These are all great thoughts. As I said, one of them is likely to be > implemented in the future. It's just been deprioritized for now. > > Clinton > > > On Thu, Feb 4, 2010 at 8:42 AM, Simone Tripodi wrote: > >> Yep, I forgot the same syntax is used in annotations :) >> BTW, it was just a 2 cents idea, not a real proposal. >> Cheers, >> Simo >> >> http://people.apache.org/~simonetripodi/ >> >> >> >> On Thu, Feb 4, 2010 at 4:22 PM, Clinton Begin >> wrote: >> > The syntax will never be removed, first because it's the preferred way >> of >> > the majority, and second, because we need a parameter syntax that is >> > compatible with other configuration options, like annotations or JSON, >> etc. >> > >> > Clinton >> > >> > On Thu, Feb 4, 2010 at 12:44 AM, Simone Tripodi < >> simone.tripodi@gmail.com> >> > wrote: >> >> >> >> 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 = > jdbcType="VARCHAR" >> >> /> >> >> STATE_ID = > jdbcType="VARCHAR" >> >> /> >> >> TIME_ZONE_ID = > >> 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 ( >> >> , >> >> , >> >> >> >> ) >> >> >> >> 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 >> 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 >> >> > 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 >> >> >> > >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org >> For additional commands, e-mail: user-java-help@ibatis.apache.org >> >> > -- Marco Speranza --0016e6d9710258fc4b047ec879ec Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Clinton,

So if the #{} syntax will never be removed we have to fix the little line-break problem, because an XML file should not be "formatting-sensitive".
Moreover yesterday night I made a simple test-case that reproduces the example wrote in the iBatis manual (page 26), and the parser raises a BuilderException (Improper inline parameter map format. =A0Should be: #{propName,attr1=3Dval1,attr2=3Dval2}).
So if your intention is maintaining this syntax, and you're open to fix this problem, I can submit through Jira the patch needed I mentioned mails ago in the same thread.
What do you think?




2010/2/4 C= linton Begin <clinton.begin@gmail.com>
These are all great thoughts.=A0 As I said, one of them is likely to be imp= lemented in the future.=A0 It's just been deprioritized for now.

Clinton

On Thu, Feb 4, 2010 at 8:42 AM, Simone Tripodi <= span dir=3D"ltr"><simone.tripodi@gmail.com> wrote:
Yep, I forgot the= same syntax is used in annotations :)
BTW, it was just a 2 cents idea, not a real proposal.
Cheers,
On Thu, Feb 4, 2010 at 4:22 PM, Clinton Begin &l= t;clinton.begi= n@gmail.com> wrote:
> The syntax will never be removed, first because it's the preferred= way of
> the majority, and second, because we need a parameter syntax that is > compatible with other configuration options, like annotations or JSON,= etc.
>
> Clinton
>
> On Thu, Feb 4, 2010 at 12:44 AM, Simone Tripodi <simone.tripodi@gmail.com>= ;
> wrote:
>>
>> 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
>> =A0DEPT_ID =3D <parameter name=3D"deptId" javaType=3D= "String" jdbcType=3D"VARCHAR"
>> />
>> =A0STATE_ID =3D <parameter name=3D"stateId" javaType= =3D"String" jdbcType=3D"VARCHAR"
>> />
>> =A0TIME_ZONE_ID =3D <parameter name=3D"timeZoneId" ja= vaType=3D"String"
>> jdbcType=3D"VARCHAR" />
>>
>> instead of
>>
>> update ORDER_ENTRY.CONTACT
>> set
>> =A0DEPT_ID =3D #{deptId, javaType=3DString, jdbcType=3DVARCHAR}, >> =A0STATE_ID =3D #{stateId, javaType=3DString, jdbcType=3DVARCHAR},=
>> =A0TIME_ZONE_ID =3D #{timeZoneId, javaType=3DString, jdbcType=3DVA= RCHAR}
>>
>> even if, of course, for a simpler case like:
>>
>> insert into
>> =A0 =A0users (
>> =A0 =A0 =A0 =A0id,
>> =A0 =A0 =A0 =A0username,
>> =A0 =A0 =A0 =A0password)
>> values (
>> =A0 =A0 =A0 =A0<parameter name=3D"id"/>,
>> =A0 =A0 =A0 =A0<parameter name=3D"username"/>,
>> =A0 =A0 =A0 =A0<parameter name=3D"password"/>
>> )
>>
>> is much more verbose than:
>>
>> insert into
>> =A0 =A0users (
>> =A0 =A0 =A0 =A0id,
>> =A0 =A0 =A0 =A0username,
>> =A0 =A0 =A0 =A0password)
>> values (
>> =A0 =A0 =A0 =A0#{id},
>> =A0 =A0 =A0 =A0#{username},
>> =A0 =A0 =A0 =A0#{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&q= uot;.
>> >
>> > Right, I just made up parameterDef to indicate is was for def= ining 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 ortho= gonal 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<= /a>
>> For additional commands, e-mail:
user-java-help@ibatis.apache.org >>
>
>

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





--
Marco Spera= nza <marco.speranza79@gmai= l.com>
--0016e6d9710258fc4b047ec879ec--