RE: select key and insert with failure

2007-09-03 Thread Lott, Neil
Hi Larry, Thanks for taking care of this. Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: Monday, September 03, 2007 3:49 PM To: user-java@ibatis.apache.org Subject: Re: select key and insert with failure I see his point, it's a

Re: select key and insert with failure

2007-09-03 Thread Larry Meadors
I see his point, it's a pain to have it fail and then leave a mess to clean up - no worries now, it'll be part of the next release. :-) Larry On 9/3/07, Nathan Maves <[EMAIL PROTECTED]> wrote: > Well I am not sure why you would care but I would suggest that when the > insert fails, which should

Re: select key and insert with failure

2007-09-03 Thread Larry Meadors
This should be fixed in SVN now - if you want to try it, you can check it out and build it. Larry On 9/3/07, Lott, Neil <[EMAIL PROTECTED]> wrote: > > If I have a selectKey pre within an insert statement that I have working: > > > > > >javaType="java.lang.String"/> > >javaType="

Re: select key and insert with failure

2007-09-03 Thread Nathan Maves
Well I am not sure why you would care but I would suggest that when the insert fails, which should produce an exception, that you catch that and then set the id field back to null. Nathan On 9/3/07, Lott, Neil <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > If I have a selectKey pre within an i

select key and insert with failure

2007-09-03 Thread Lott, Neil
Hello, If I have a selectKey pre within an insert statement that I have working: insert into OD_ACTOR ( ACTOR_FIRST_NAME, ACTOR_LAST_NAME, ACTOR_BIO, OD_ACTOR_ID ) values ( ?, ?, ?,

Re: JavaBean and Map parameters

2007-09-03 Thread Larry Meadors
Heh, I think I wrote that part. :-) You can't reliably refer to an *anonymous* inner class by name (hence the anonymous part - IIRC, they are assigned names by location MyClass$1, MyClass$2, etc), so you can't safely put the name in your mapped statement, so iBATIS doesn't do that load time checki

RE: JavaBean and Map parameters

2007-09-03 Thread Niels Beekman
This only holds when the bean-class is explicitly specified, i.e. it must not be an anonymous class. If it's anonymous, iBATIS has no way to inspect the bean class, since it's unknown at load-time. Niels -Original Message- From: Ilya Boyandin [mailto:[EMAIL PROTECTED] Sent: maandag 3 s

Re: JavaBean and Map parameters

2007-09-03 Thread Ilya Boyandin
Hi Larry, Larry Meadors wrote: I don't know about the performance - a hashmap is pretty fast for retrieval. (FYI: the constructor you use there will cause slower performance - the default would use more memory, but be faster - using 3 or 4 as the parameter might be better, read the javadocs on

Re: JavaBean and Map parameters

2007-09-03 Thread Jiming Liu
I dont know how iBatis set the properties of a bean. In case it uses reflection, it surely will slower than hashmap. But if it uses the bean.set...(...) directly, i believe it is faster than hashmap. Jiming On 9/3/07, Larry Meadors <[EMAIL PROTECTED]> wrote: > > I don't know about the performan

Re: JavaBean and Map parameters

2007-09-03 Thread Larry Meadors
I don't know about the performance - a hashmap is pretty fast for retrieval. (FYI: the constructor you use there will cause slower performance - the default would use more memory, but be faster - using 3 or 4 as the parameter might be better, read the javadocs on that one.) The parameter checking

Re: Not working with derby 10.3.1.4

2007-09-03 Thread Larry Meadors
Hm, OK..is the hostName property null? Some JDBC drivers gag on that, and you have to provide a database type - like this: #hostName:VARCHAR# - try that, and see if it makes it happy. Larry On 9/3/07, Zsolt Koppany <[EMAIL PROTECTED]> wrote: > CREATE TABLE users(id INTEGER NOT NULL GENERATED BY

RE: Using discriminator with an interface

2007-09-03 Thread MCCORMICK, Paul
If the sub classes have a common setter method then its possible the use the that setter as the required single result in the result map. As you interface will not have setters you'll have to use any one of the sub classes (BlackSomething or WhiteSomething) as the "class" attribute in the mai

Using discriminator with an interface

2007-09-03 Thread Ilya Boyandin
Hello all, is that possible to use discriminator with an interface without setters? I have something like this in my mappings: ... ... ... And I always get this RuntimeException: "resultMap Something.somethingResult must have at least one result ma

Re: JavaBean and Map parameters

2007-09-03 Thread Ilya Boyandin
Thanks, Larry! but could you tell me why? I thought using an anonymous class has an important advantage: it allows loading-time parameter check. Also I think it should be faster than using HashMap. Isn't it true? Ilya Larry Meadors wrote: Well, they should both do the same thing...I'd use

RE: Not working with derby 10.3.1.4

2007-09-03 Thread Zsolt Koppany
CREATE TABLE users(id INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,name VARCHAR(50) NOT NULL,passwd CHAR(254),status VARCHAR(255),hostname VARCHAR(255),firstname VARCHAR(100), lastname VARCHAR(150),title VARCHAR(50),address VARCHAR(255),zip VARCHAR(1