ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miika Mäkinen" <mmi...@gmail.com>
Subject Re: IList<string>
Date Thu, 07 Jun 2007 00:06:56 GMT
I suppose this is a bug? I made a simple object Color with one property Name
and that way it works...

On 6/6/07, Miika Mäkinen <mmiika@gmail.com> wrote:
>
> Hi all,
> I'm having trouble with mapping results to IList<string> from a left join
> query.
>
> I have following map:
>
>         <resultMap id="assetTypeResult" class="DTO.AssetType"
> groupBy="AssetForProjectId">
>             <result property="Code" column="asset_code" />
>             <result property="Name" column="asset_name" />
>             <result property="AssetForProjectId"
> column="asset_for_project_id" />
>             <result property="ListPrice" column="asset_list_price" />
>             <result property="AvailableColors" resultMapping="
> Project.colorResult" />
>         </resultMap>
>         <resultMap id="colorResult" class="string">
>             <result property="value" column="available_color_name" />
>         </resultMap>
>
> And the sql query is doing a left outer join (sometimes no colors) from
> assetType table to color table. The data is returned ok from the db and
> everything else works fine and AvailableColors has the right number of items
> in the list. The problem is that all the items in the list are empty
> (0-length strings). Wonder what is going wrong here?
>
> Thanks,
> Miika
>

Mime
View raw message