ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Mapping int type in constructor of resultMap type
Date Tue, 05 Jan 2010 15:52:04 GMT
I'm glad someone remembered.  LOL.  I think I closed 15 issues in 3 days
that weekend, so it's all a blur.

Clinton

On Tue, Jan 5, 2010 at 8:23 AM, OBender <osya_bender@hotmail.com> wrote:

>  You have to use javaType=”_int” not javaType=”int” in the XML to map the
> primitive type.
>
> I submitted this as an issue and Clinton kindly fixed it in B6 or B5 I
> believe :).
>
>
>
> *From:* Clinton Begin [mailto:clinton.begin@gmail.com]
> *Sent:* Tuesday, January 05, 2010 10:06 AM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Mapping int type in constructor of resultMap type
>
>
>
> Are you running Beta 7?  I know I looked into that issue, and I either
> fixed it, or determined that it wasn't possible.  I recall something weird
> about constructor reflection with primitive types.  Try Beta 7, if that
> doesn't work, I'll look through the commit log to see what I had to say
> about that.
>
> Clinton
>
> On Tue, Jan 5, 2010 at 1:59 AM, vishalj <VishalJ@ivycomptech.com> wrote:
>
>
> For a constructor defined like this :
>
> public UserProfile(int id)
> {
>        this.id=id;
> }
>
> and resultmap having :
> <constructor>
>        <idArg column="id" javaType="int"/>
> </constructor>
>
> is not working and instead giving Exception as :
> Error instantiating class com.xyz.beans.UserProfile with invalid types
> (Integer,) or values (1,). Cause: java.lang.NoSuchMethodException:
> com.xyz.beans.UserProfile.<init>(java.lang.Integer).
>
>
> --
> View this message in context:
> http://old.nabble.com/Mapping-int-type-in-constructor-of-resultMap-type-tp27025441p27025441.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.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