ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "OBender" <osya_ben...@hotmail.com>
Subject constructor mapping and primitive types - bug or feature?
Date Sat, 28 Nov 2009 14:57:07 GMT
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="T1" id="T1Result">

        <constructor>

            <arg column="xxx" javaType="long" />

        </constructor>

    </resultMap>

 

---

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.


Mime
View raw message