ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brandon Goodin" <brandon.goo...@gmail.com>
Subject Re: Pass multiple parameters using Map
Date Thu, 17 Apr 2008 01:44:59 GMT
Map param = new HashMap();param.put("someProp",someValue);
param.put("otherProp",someOtherValue);
sqlMapClient.queryForList("Foo.selectForSomething",param);

<select id="selectForSomething" parameterClass="map"
resultClass="SomeDomainClass">
select id,someColumn,someOtherColumn,someName from foo where
someColumn=#someProp# and someOtherColumn=#otherProp#
</select>

Brandon Goodin

On Wed, Apr 16, 2008 at 8:10 PM, Li Ma <lima01@gmail.com> wrote:

> Hi,
>
> Here's a newbie question for iBATIS:
> I need to pass three parameters to a <select> query. I don't want to
> create a new class just for this one query, so I tried to use Map as
> parameterClass even parameterMap, nothing worked.
> Anyone can provide a sample of doing such kind of task? I did Google and
> search iBATIS mailinglist, but found nothing. So please help!
>
> Thanks!
>
> --
> Li Ma
> lima01@gmail.com
> http://www.idealtechs.com

Mime
View raw message