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: TypeHandler for a complex property
Date Thu, 06 Jan 2005 15:50:56 GMT
That might work, but why would you do that?


On Wed, 5 Jan 2005 10:56:49 -0500, Clasen, Scott <Scott.Clasen@hbo.com> wrote:
> Is it possible to use a type handler for a complex property?
> Something like this, where the query for the child List returns a list of
> strings, that I want to convert to "Child" objects?
> <resultMap id="parent" class="foo.Parent">
>    <result property="name" column="name"/>
>    <result property="children" column="id" select="getChildren"
> typeHandler="foo.ChildMaker" />
> </result>
> <statement id="getChildren" parameterClass="java.lang.String"
> resultClass="java.lang.String">
>    select childValueString from child where parentId = #id#
> </statement>
> Thanks
> Scott C
> ==============================================================================
> This e-mail is intended only for the use of the addressees.  Any copying, forwarding,
printing or other use of this e-mail by persons other than the addressees is not authorized.
 This e-mail may contain information that is privileged, confidential and exempt from disclosure.
 If you are not the intended recipient, please notify us immediately by return e-mail (including
the original message in your reply) and then delete and discard all copies of the e-mail.
 Thank you.

View raw message