ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hanson" <mnbo...@gmail.com>
Subject Re: Constuctor with GroupBy Problem
Date Wed, 25 Jul 2007 14:05:03 GMT
Group by result maps do not currently support the use of a constructor
element.

On 7/25/07, Samnang Chhun <samnang.chhun@gmail.com> wrote:
>
>  Hi,
>
>
>
> I'm just getting to work with iBatis.Net in my C# project. I found a
> problem when I call constructor with groupBy in my ResultMap. What have I
> done something wrong?
>
>
>
> <resultMap id="personResult" class="Person" groupBy="_id">
>
>       <constructor>
>
>           <argument argumentName="id" column="id"/>
>
>       </constructor>
>
>       <result property="_name" column="name" />
>
>       <result property="_address" resultMapping="Person.addressResult"/>
>
> </resultMap>
>
>
>
> <resultMap id="addressResult" class="Address">
>
>       <result property="_type" column="type" />
>
>       <result property="_value" column="value" />
>
> </resultMap>
>
>
>
> My error is : System.NullReferenceException: Object reference not set to
> an instance of an object.
>
>
>
>
>
> Cheers,
>
> Samnang
>

Mime
View raw message