Re: IBatis 3.0 beta 10 + annotations + stored procedures

2010-03-24 Thread Clinton Begin
Oh I didn't even notice, but your parameter is a String, which is immutable. You'd have to pass the parameter in as a Map or a POJO. Since Java doesn't support pass by reference, or out parameters, or mutable strings, there's no way around this. Clinton On Wed, Mar 24, 2010 at 9:15 PM, Clint

Re: IBatis 3.0 beta 10 + annotations + stored procedures

2010-03-24 Thread Clinton Begin
You have to tell iBATIS that it's a proc, and set the statement type to CALLABLE and set the parameter to an output parameter, as follows: @Select(" ibatis3select(#{Currency*,mode=OUT*}) ") *...@options(statementType = StatementType.CALLABLE)* Integer selectACurrencyBatis3(String sCurrency ); Mos

RE: newbie Q: get back generated key with Oracle

2010-03-24 Thread Morearty, Brian
Related to this discussion earlier today, I have a feature request. I'm not sure if this should be in iBATIS or Ibator. Problem: if I let Oracle autogenerate a primary key for me, like this: SELECT businesses_sequence.nextval FROM dual insert into WEBSITE_USER.BUSINESSES

RE: newbie Q: get back generated key with Oracle

2010-03-24 Thread Morearty, Brian
Oh yeah, it does! Duh! Woo hoo. Thanks for the quick reply, Larry. -Original Message- From: Larry Meadors [mailto:larry.mead...@gmail.com] Sent: Wednesday, March 24, 2010 11:15 AM To: user-java@ibatis.apache.org Subject: Re: newbie Q: get back generated key with Oracle It should set th

Re: newbie Q: get back generated key with Oracle

2010-03-24 Thread Larry Meadors
It should set the id property on the Business bean passed in as a parameter. Larry On Wed, Mar 24, 2010 at 12:11 PM, Morearty, Brian wrote: > Hi, here’s a newbie question: > > > > I’m using iBATIS, Ibator, and Oracle. I have a “businesses” table. I also > created a “businesses_sequence” sequenc

newbie Q: get back generated key with Oracle

2010-03-24 Thread Morearty, Brian
Hi, here's a newbie question: I'm using iBATIS, Ibator, and Oracle. I have a "businesses" table. I also created a "businesses_sequence" sequence so I can autogenerate primary keys. (Apparently Oracle does it that way instead of allowing an autoincrement column.) How do I get back the prima

Re: return simple String[] or List

2010-03-24 Thread Guy Rouillier
On 3/24/2010 10:30 AM, Tomáš Procházka wrote: It's possible return simple String[] or List with ibatis maping? You don't mention which version of iBATIS you are using, so I'm assuming version 3. This works: In documentation is only 'int' 'hashmap' and collection of own class.

Re: return simple String[] or List

2010-03-24 Thread Larry Meadors
You want result*Class*="java.util.String" - not result*Map*="java.util.String". Larry - To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org

Re: return simple String[] or List

2010-03-24 Thread Maciej Radochonski
Hi Tomas, You can use "queryForList". It will return a List of objects specified in resultMap/resultClass. -- Regards, Maciej Radochonski mradochon...@gmail.com http://www.mradochonski.com http://www.linkedin.com/in/mradochonski --

return simple String[] or List

2010-03-24 Thread Tomáš Procházka
It's possible return simple String[] or List with ibatis maping? In documentation is only 'int' 'hashmap' and collection of own class. Itried resultType="java.util.String[]" or resultMap="java.util.String" and it doesn't work -- Tomas Prochazka

Re: read large result set in Ibatis3

2010-03-24 Thread Tomáš Procházka
Hi. Yes. This was caused by missing session close(). -- Original message -- From: Clinton Begin Subject: read large result set in Ibatis3 Date: Wednesday, February 24, 2010, 4:05:15 PM Attachments: msgid: 16178eb1100224

IBatis 3.0 beta 10 + annotations + stored procedures

2010-03-24 Thread Arpon
Does anyone have an example of calling stored procedures with IN and OUT parameters without IBatis Map files (by using Annotations). Sending parameter to procedure works well, but can't return parameter... I am using IBatis3 beta 10... Interface: @Select(" ibatis3select(#{Currency}) ") Integer