Re: ibatis3 : multiple parameters in statement without map or bean

2010-05-17 Thread Nicolas ANTONIAZZI
Thank you Larry, I did not read correctly the User Guide. Indeed, it says : *If your mapper method takes multiple parameters, this annotation can be applied to a mapper method parameter to give each of them a name. Otherwise, multiple parameters will be named by their ordinal position (not

Re: ibatis3 : multiple parameters in statement without map or bean

2010-05-17 Thread Larry Meadors
Yes, you have to annotate the parameters (because java reflection is kinda weak). It's in the user guide. Larry On Mon, May 17, 2010 at 4:15 AM, Nicolas ANTONIAZZI wrote: > Hi, > Is it possible to pass multiple parameters in iBatis3 without having to pass > a map or a be

ibatis3 : multiple parameters in statement without map or bean

2010-05-17 Thread Nicolas ANTONIAZZI
Hi, Is it possible to pass multiple parameters in iBatis3 without having to pass a map or a bean ? example : - UserMapper.xml SELECT * FROM user OFFSET #{offset} LIMIT #{limit} - UserMapper.java --- public interface UserMapper { public List

RE: Multiple parameters in sqlmap parameters.

2009-06-03 Thread meindert
ne 2009 11:45 PM To: user-java@ibatis.apache.org Subject: Multiple parameters in sqlmap parameters. Please excuse me if this turns out to be a dumb question. Is it possible to do something simple like pass two int parameters into a statement? These are the examples I see in the manual: One simpl

Re: Multiple parameters in sqlmap parameters.

2009-06-01 Thread Jeff Stahl
Actually, the easiest way to handle the same thing is to put both parameters into a Map (HashMap works nicely), and pass the Map as the single parameter that iBATIS methods take. Hope This Helps, Jeff Stahl NathanM wrote: Please excuse me if this turns out to be a dumb question. Is it poss

Multiple parameters in sqlmap parameters.

2009-06-01 Thread NathanM
two ints? Nathan -- View this message in context: http://www.nabble.com/Multiple-parameters-in-sqlmap-parameters.-tp23822891p23822891.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

Re: Multiple Parameters

2008-10-20 Thread Larry Meadors
> From: Vadim [EMAIL PROTECTED] > Sent: Monday, 20 October 2008 5:49 PM > To: user-java@ibatis.apache.org > Subject: Re: Multiple Parameters > > I don't see anything wrong, except 'FROM ATABLE o' in your query, but that's > probably a typo

RE: Multiple Parameters

2008-10-20 Thread Bruno Frascino
my database and it works fine. Do you know any configuration that could affect this behaviour of passing multiple parameters? If I could see the query IBATIS is trying to run, maybe I could have a clue of what is happening... how can I see it? Thanks and r

Re: Multiple Parameters

2008-10-19 Thread Vadim
I don't see anything wrong, except 'FROM ATABLE o' in your query, but that's probably a typo, because you would have got an exception by now. Also, you are searching by ID's - maybe queryForObject is more appropriate in this case (just a guess)? Have you tried logging database calls? Do the right p

Multiple Parameters

2008-10-19 Thread Bruno Frascino
Hello, I have got: then my DAO does: Map paramM = new HashMap(); paramM.put("userId", userId); paramM.put("employeeId", employeeId); users = (List)this.getSqlMapClientTemplate().queryForList("findIt", paramM); My users list is not null, I don't get any error d

RE: Pass multiple parameters using Map

2008-04-16 Thread Jason Kratz
No offense here but did you read the documentation PDF?  This exact topic is discussed on page 30 of the developer's guide.  There are multiple ways of doing what you want but your specific case is on page 30. Jason   Hi, Here's a newbie question for iBATIS: I need to pass three parameters to

Re: Pass multiple parameters using Map

2008-04-16 Thread Brandon Goodin
Map param = new HashMap();param.put("someProp",someValue); param.put("otherProp",someOtherValue); sqlMapClient.queryForList("Foo.selectForSomething",param); select id,someColumn,someOtherColumn,someName from foo where someColumn=#someProp# and someOtherColumn=#otherProp# Brandon Goodin On Wed,

Pass multiple parameters using Map

2008-04-16 Thread Li Ma
Hi, Here's a newbie question for iBATIS: I need to pass three parameters to a 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 sear

Re: cursor or multiple parameters

2007-07-13 Thread Koka Kiknadze
Well, if you want to do it with domain object, think yuo can do it with three sql statements instead of two - Select for update returning you domain object. Delete the row using selected object. Change the desired field of the object and run insert. Of course it will work unless your table h

Re: cursor or multiple parameters

2007-07-13 Thread Larry Meadors
With that database design, there is really no other way. You could use a Map, I suppose. Larry On 7/13/07, Severin Ecker <[EMAIL PROTECTED]> wrote: hi Larry, yes or course, but there i need either a new type that i hand over to the sqlmap unless i can use more than one parameters.. or a list

Re: cursor or multiple parameters

2007-07-13 Thread Severin Ecker
hi Larry, yes or course, but there i need either a new type that i hand over to the sqlmap unless i can use more than one parameters.. or a list. your solution (which is the one i'm using atm) requires another type definiton since i can't use the domain object public class Bla { String hell

Re: cursor or multiple parameters

2007-07-13 Thread Larry Meadors
update foo set bar = #newBar# where foo = #foo# and bar = #bar# Larry On 7/13/07, Severin Ecker <[EMAIL PROTECTED]> wrote: hi all, i have a problem (which i think i need to resolve with cursors but maybe you know another way in ibatis) let's say i have a table ( hello VARCHAR, world VARCHAR

cursor or multiple parameters

2007-07-13 Thread Severin Ecker
hi all, i have a problem (which i think i need to resolve with cursors but maybe you know another way in ibatis) let's say i have a table ( hello VARCHAR, world VARCHAR ) both fields form the primary key together. what i need is, selecting one specific entry (by specifying values for both f