Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 14211 invoked from network); 3 Feb 2010 17:17:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 17:17:16 -0000 Received: (qmail 37409 invoked by uid 500); 3 Feb 2010 17:17:15 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 37390 invoked by uid 500); 3 Feb 2010 17:17:15 -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 37382 invoked by uid 99); 3 Feb 2010 17:17:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 17:17:15 +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.78.148 as permitted sender) Received: from [74.125.78.148] (HELO ey-out-1920.google.com) (74.125.78.148) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 17:17:06 +0000 Received: by ey-out-1920.google.com with SMTP id 26so313135eyw.10 for ; Wed, 03 Feb 2010 09:16:46 -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=THPBRQpRerg1JCOzqNQwE/p6rbD9Bc9I4fvSiSgX158=; b=vmlZonIe7TC4F4VVeYiNy6FI1VJVnRlCZEcak9aB5vYVWu7lhd3+jfNFRyHhZf+Efa Vlh11cNvSXDfxojdwuimG9iqwVvExt/szT49bcWBJs/6LRRTxGEXSWOW2dyYBpxziV1Q hrk/HmgUqaEdMNE0tnQ86pVQP1q1hlBHEDKUI= 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=Ae7yOnxnyD2wmewOTnZPDy0ZPmBJabMoej6IQfiUzwkVIpxo/psyjtEswBZvbGhXAi lQM2fLK2eA2Rt2QcnaYByhS614RLC/vApZTFPm3x74gJPQVRlb0A0dmUjFKX3cF2MYFe JXi2yuzytnMgDbN0+sDUrN1T9jrqPJDRm5Tns= MIME-Version: 1.0 Received: by 10.216.93.78 with SMTP id k56mr881979wef.102.1265217406571; Wed, 03 Feb 2010 09:16:46 -0800 (PST) In-Reply-To: <16178eb11002020625n431fc10q9849496b5b29bc5a@mail.gmail.com> References: <81cfe9551002020613n4fabb9e9ha824154762df2b9b@mail.gmail.com> <16178eb11002020625n431fc10q9849496b5b29bc5a@mail.gmail.com> From: Marco Speranza Date: Wed, 3 Feb 2010 18:16:26 +0100 Message-ID: <81cfe9551002030916j1e0aee57lb9bc425570de2ca7@mail.gmail.com> Subject: Re: Mapper parsing problem To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=0016e6d78455151876047eb56247 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d78455151876047eb56247 Content-Type: text/plain; charset=ISO-8859-1 Hi Clinton, thanks for your reply, I understand that's a design choice but I sadly noticed that when the property parameter contains a break line character, iBatis raises a so generic error that I had to spend a lot of time to understand what was the cause... So, yesterday I spent a good part of the night studying iBatis code to create a patch that easily (1 line of code) add the support for break line character, with testcases. If you all are open to this suggestion, I'd more than happy to open a Jira issue and attach the patch, please let me know!!! thank 2010/2/2 Clinton Begin > That is by design and will not change. I suggest that when formatting > parameters, put the entire thing on a newline when necessary. It's > far too unreadable if you spit them up. > > Clinton > > On 2010-02-02, Marco Speranza wrote: > > Hi all Guys, > > > > we have found a little problem on iBatis3. > > We have create a xml mapper file with this query: > > > > > > > > > > UPDATE TAB > > > > ID = #{id}, > > DESC = #{desc, jdbcType=TIMESTAMP, > > typeHandler=SqlTimestampAsLongTypeHandler}, > > > > WHERE > > > > ... > > > > > > > > > > where SqlTimestampAsLongTypeHandler is an our type handler. > > > > if there is a TAB character or a NEW LINE character between javaType and > > typeHandler parameter, the type handler is ignored. > > > > thanks all > > > > > > > > -- > > Marco Speranza > > > > -- > Sent from my mobile device > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > -- Marco Speranza --0016e6d78455151876047eb56247 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Clinton,
thanks for your reply, I understand that's a design choi= ce but I sadly noticed that when the property parameter contains a break li= ne character, iBatis raises a so generic error that I had to spend a lot of= time to understand what was the cause...

So, yesterday I spent a good part of the night studying iBatis code to = create a patch that easily (1 line of code) add the support for break line = character, with testcases.
If you all are open to this suggestion, I'= ;d more than happy to open a Jira issue and attach the patch, please let me= know!!!

thank

2010/2/2 Clinton Begin <clinton.begin@gmail.com>
That is by design and will not change. =A0I suggest that when formatting parameters, put the entire thing on a newline when necessary. =A0It's far too unreadable if you spit them up.

Clinton

On 2010-02-02, Marco Speranza <marco.speranza79@gmail.com> wrote:
> Hi all Guys,
>
> we have found a little problem on iBatis3.
> We have create a xml mapper file with this query:
>
>
> <update id=3D"myUpdate" parameterType=3D"MyBean"= ; =A0flushCache=3D"true">
>
> =A0 =A0 =A0 =A0 UPDATE TAB
> =A0 =A0 =A0 =A0 <set>
> =A0 =A0 =A0 =A0 =A0 =A0 <if test=3D"id !=3D null"> ID = =3D #{id}, </if>
> =A0 =A0 =A0 =A0 =A0 =A0 <if test=3D"desc !=3D null"> D= ESC =3D #{desc, jdbcType=3DTIMESTAMP,
> typeHandler=3DSqlTimestampAsLongTypeHandler}, </if>
> =A0 =A0 =A0 =A0 </set>
> =A0 =A0 =A0 =A0 WHERE
>
> =A0 =A0 =A0 ...
>
> =A0</update>
>
>
> where SqlTimestampAsLongTypeHandler is an our type handler.
>
> if there is a TAB character or a NEW LINE character between javaType a= nd
> typeHandler parameter, the type handler is ignored.
>
> thanks all
>
>
>
> --
> Marco Speranza <marco.speranza79@gmail.com>
>

--
Sent from my mobile device

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




--
Marco Spera= nza <mar= co.speranza79@gmail.com>
--0016e6d78455151876047eb56247--