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: Collection properties in resultMap
Date Wed, 02 Nov 2005 14:15:55 GMT
It should be possible, but I can't even remember. More importantly, why
would you do that?

If your set is fixed enough to be enumerated to customField1...customField3,
then why wouldn't you just have 3 properties on your class called
CustomField1 ... CustomField3?

You're creating potential for pain in the future with a design like that.

Cheers,
Clinton


On 10/29/05, Amad Fida <amad.fida@gmail.com> wrote:
>
> Hi all,
>
> I have a table which has columns like CutomField1, CustomField2, etc
>
> Now I have a class
>
> Class User {
>
> private Collection customFields;
> .....
> }
>
> How would I map individual columns to single collection property?
>
> Is something like this possible?
>
> <resultMap id="user" class="User">
> <result property="customFiels[0]" column="CustomField1"/>
> <result property="customFiels[1]" column="CustomField2"/>
> <result property="customFiels[2]" column="CustomField3"/>
>
> ....
>
>
> Thanks
>
> Amad
>
>

Mime
View raw message