ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Johnson" <jmjhn...@hotmail.com>
Subject Re: Order By
Date Wed, 24 May 2006 18:49:33 GMT
That solves the problem. I set the parameter class to java.util.Map, but I 
set up everything else as stated in original reply. Thanks to all three of 
you for your quick responses and help.

----- Original Message ----- 
From: "Brandon Goodin" <brandon.goodin@gmail.com>
To: <user-java@ibatis.apache.org>
Sent: Monday, May 22, 2006 8:28 PM
Subject: Re: Order By


yes, tha is correct.  you would need to make the parameter class a map.

Brandon

On 5/22/06, Ted Schrader <tschrader@gmail.com> wrote:
> Wouldn't
>
>           parameterClass="BusClass"
>
> in the <select> need to change to
>
>           parameterClass="map"?
>
> Ted
>
> On 22/05/06, Nathan Maves <Nathan.Maves@sun.com> wrote:
> >
> > use a map as the parameter
> >
> > map.put("orderBy", orderBy");
> > map.put("businessObj", businessObj);
> >
> > Then in the sqlmap...
> >
> >
> >
> > <select id="getaTableByAll" resultMap="result" 
> > parameterClass="BusClass">
> >
> >
> > select * from aTable where col1 like #businessObj.col1# and col2 like
> > #businessObj,col2# order by $orderBy$
> >
> > </select>
> >
> >
> > On May 22, 2006, at 1:41 PM, James Johnson wrote:
> >
> >
> > I have the following select statement:
> >
> >
> > <select id="getaTableByAll" resultMap="result" 
> > parameterClass="BusClass">
> >
> > select * from aTable where col1 like #col1# and col2 like #col2# order 
> > by
> > $orderBy$
> >
> > </select>
> >
> > However, I do not have (and do not want) orderBy as a data member of 
> > class
> > BusClass. How can I pass in orderBy without it being a data member of 
> > class
> > BusClass? Thanks for the help in advance.
> >
> >
>

Mime
View raw message