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 IList<string>
Date Wed, 06 Jun 2007 06:39:19 GMT
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