You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Clasen, Scott" <Sc...@hbo.com> on 2005/01/05 16:56:49 UTC

TypeHandler for a complex property

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.