Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 34407 invoked from network); 28 Nov 2009 14:57:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Nov 2009 14:57:33 -0000 Received: (qmail 79164 invoked by uid 500); 28 Nov 2009 14:57:33 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 79089 invoked by uid 500); 28 Nov 2009 14:57:31 -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 79081 invoked by uid 99); 28 Nov 2009 14:57:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2009 14:57:31 +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 osya_bender@hotmail.com designates 65.55.90.111 as permitted sender) Received: from [65.55.90.111] (HELO snt0-omc2-s36.snt0.hotmail.com) (65.55.90.111) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Nov 2009 14:57:21 +0000 Received: from SNT124-DS11 ([65.55.90.71]) by snt0-omc2-s36.snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 28 Nov 2009 06:57:00 -0800 X-Originating-IP: [24.61.92.31] X-Originating-Email: [osya_bender@hotmail.com] Message-ID: From: "OBender" To: References: <031501ca6c52$6e8fdb00$4baf9100$@com> In-Reply-To: <031501ca6c52$6e8fdb00$4baf9100$@com> Subject: constructor mapping and primitive types - bug or feature? Date: Sat, 28 Nov 2009 09:57:07 -0500 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F1_01CA7011.256D8590" X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcpsUisLx0HzL6SJT+2iXklnEoTvKQAAC1GwAPol+wA= Content-Language: en-us X-OriginalArrivalTime: 28 Nov 2009 14:57:00.0215 (UTC) FILETIME=[09BB9470:01CA703B] X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_00F1_01CA7011.256D8590 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi All, There is one very strange issue. If there is a constructor with primitive argument, say long and you have a mapping with: --- public class T1 { final private long xxx; public T1( long xxx ) { this.xxx = xxx; } } --- The execution fails trying to find constructor with java.lang.Long type instead of primitive long type. Is this a bug or constructors with primitive types are not supported? Thanks. ------=_NextPart_000_00F1_01CA7011.256D8590 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi All,

 

There is one very strange issue. If there is a = constructor with primitive argument, say long and you have a mapping = with:

<resultMap type=3D"T1" id=3D"T1Result">

        <constructor>

         &= nbsp;  <arg column=3D"xxx" javaType=3D"long" = />

        = </constructor>

    = </resultMap>

 

---

public class T1

{

         &= nbsp;      final private long xxx;

 

         &= nbsp;      public T1( long xxx )  {

         &= nbsp;           &n= bsp;          this.xxx =3D xxx;

         &= nbsp;      }

}

---

 

The execution fails trying to find constructor with = java.lang.Long type instead of primitive long type.

 

Is this a bug or constructors with primitive types = are not supported?

 

Thanks.

------=_NextPart_000_00F1_01CA7011.256D8590--