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 Makunda Thapa <ma...@hotmail.com> on 2006/11/06 22:59:33 UTC

Issues on converting Old Dao to Ibatis sql-map

Hi,
I all, I have been involved to convert old daos to sql mapper xml. One of 
the problem I having is.My old daos uses  same field in more than one 
params. I have to keep adding these fields in to my VO to pass in to the sql 
mappers. For example

				Object[] params = new Object[4];
				params[0] = argStartTimeStamp;
				params[1] = argEndTimeStamp;
                               params[2]

SELECT client_number, user_id, security_code, event, functionality from 
table where event_timestamp >= ? AND event_timestamp <= ?

Both of these time stamps fields are one field in the table. For my new VO, 
I have to add these new fields. Is there way I can pass these params in the 
sql-mapper without adding in the VO class.

_________________________________________________________________
All-in-one security and maintenance for your PC.  Get a free 90-day trial! 
http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail


Re: Issues on converting Old Dao to Ibatis sql-map

Posted by Larry Meadors <lm...@apache.org>.
Use a Map, and please read the developer's guide.

http://ibatis.apache.org/javadownloads.html

Larry


On 11/6/06, Makunda Thapa <ma...@hotmail.com> wrote:
> Hi,
> I all, I have been involved to convert old daos to sql mapper xml. One of
> the problem I having is.My old daos uses  same field in more than one
> params. I have to keep adding these fields in to my VO to pass in to the sql
> mappers. For example
>
>                                 Object[] params = new Object[4];
>                                 params[0] = argStartTimeStamp;
>                                 params[1] = argEndTimeStamp;
>                                params[2]
>
> SELECT client_number, user_id, security_code, event, functionality from
> table where event_timestamp >= ? AND event_timestamp <= ?
>
> Both of these time stamps fields are one field in the table. For my new VO,
> I have to add these new fields. Is there way I can pass these params in the
> sql-mapper without adding in the VO class.
>
> _________________________________________________________________
> All-in-one security and maintenance for your PC.  Get a free 90-day trial!
> http://clk.atdmt.com/MSN/go/msnnkwlo0050000002msn/direct/01/?href=http://www.windowsonecare.com/?sc_cid=msn_hotmail
>
>