ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nic Smith" <nsm...@boardbooks.com>
Subject RE: Passing a custom class type + additional data
Date Thu, 19 Jul 2007 19:43:30 GMT
Has anyone actually managed to get this working? It doesn't looking like
iBatis supports the 'dot notation'. So while you can pass through custom
classes in a map you can't then access any of its properties. Is there
anything I may have missed here?





From: Tony Johnson [mailto:listAccount@deepcode.co.uk] 
Sent: Thursday, 19 July 2007 8:59 p.m.
To: user-cs@ibatis.apache.org
Subject: RE: Passing a custom class type + additional data


Yeah, you should certainly be able to do that... 




From: Nic Smith [mailto:nsmith@boardbooks.com] 
Sent: 19 July 2007 03:44
To: user-cs@ibatis.apache.org
Subject: Passing a custom class type + additional data




Is it possible to pass in user defined types  as well as additional data
types in a Map. For example:



<select id="SelectDocument" parameterClass="map"


I want the map to contain a type of "Document" (a class in our .Net
code), as well as an int[].


So, the key value pairs would be: 

document, {object type of Document}

groups, {int[]}


Can I then in my SQL statement write something like this?




   Id = #document.Id#, 

   Name = #document.ShortName# 


   GroupId IN

   <iterate property=" groups" open="(" close=")" conjunction=",">

 # groups[]#



If this isn't the case? Is there some other way that I can do this?



View raw message