Re: SubQuery

2009-04-16 Thread Nathan Maves
;java.lang.Integer"> > > > >resultMap="th.A"> > > ]]> > > > > > > > > > > > > > I don't know how to pass into getIds subquery PrimB and secBs can anybody > help please? > > Thanks > * >

SubQuery

2009-04-16 Thread Aleksandr Elbakyan
ass into getIds subquery PrimB and secBs can anybody help please? Thanks

Subquery

2009-04-16 Thread AlexElba
Hello, I have class A{ private Integer id; private Set primB; private Set secBs; private Set allBIds; . } class B{ private Integer id; private String name; } ]]> I don't know how to pass into getIds subquery PrimB a

Enum handling problem with subquery / list

2008-04-03 Thread Reuben Firmin
Hi, I'm having a problem handling enums from a subquery. I have a type handler registered for the enums, but it doesn't seem to be called. Essentially, on my result map, I have a subquery like this: This corresponds to: public void setRoles(List roles) { this.rol

RE: Subquery with where clause

2008-02-15 Thread Vinaya Tirikkovalluru
Nevermind... I got it working .. Thanks Vinaya From: Vinaya Tirikkovalluru Sent: Tuesday, February 12, 2008 4:11 PM To: 'user-java@ibatis.apache.org' Subject: Subquery with where clause Hi, I have this situation where I need to w

Subquery with where clause

2008-02-12 Thread Vinaya Tirikkovalluru
Hi, I have this situation where I need to write a sub query. The query would be similar to : SELECT * FROM table1 a AND EXISTS ( SELECT 1 FROM Table2 b WHERE b.col1 = a.col1 AND b.col2 = a.col2

Re: iBatis Subquery and Date error

2006-01-26 Thread Nathan Maves
haha that is what I meant to say. Sorry about the confusion. busy day here at the office. On Jan 26, 2006, at 3:03 PM, Michael Campbell wrote: Nathan Maves <[EMAIL PROTECTED]> writes: Stick with java.sql.Date. Try never to use java.util.Date. Why? The Ibatis datamapper doc (2.0, page 31)

Re: iBatis Subquery and Date error

2006-01-26 Thread Michael Campbell
Nathan Maves <[EMAIL PROTECTED]> writes: > Stick with java.sql.Date. Try never to use java.util.Date. Why? The Ibatis datamapper doc (2.0, page 31) says: "The use of java.sql.date types is discouraged. It is a best practice to use java.util.Date instead." I'm tending to go with the author o

RE: iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
DB2   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 1:47 PM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and Date error   Yeah after I sent that I saw that it would not work.   What DB are you using

Re: iBatis Subquery and Date error

2006-01-26 Thread Nathan Maves
@ibatis.apache.orgSubject: Re: iBatis Subquery and Date error Here are a few things to do that will not solve your problem but will help clean it up. 1. Use the instead of 2. Don't specify "remapResults" because you dont have any :)  This option is not available in an see item #1 To fix your proble

RE: iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
Ok. I will try turning the logging on and see what the actual SQL is. Thanks for your help. I will post my results soon.   From: Jeff Butler [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 11:59 AM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and

Re: iBatis Subquery and Date error

2006-01-26 Thread Jeff Butler
t gives me the data type mismatch error.     From: Jeff Butler [mailto: [EMAIL PROTECTED]] Sent: Thursday, January 26, 2006 11:44 AM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and Date error   My guess is that you've not really got the String format for a Date right for your databas

RE: iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
Where Id = #id#   it works.   But as soon as I pass it as a string in the hashmap it gives me the data type mismatch error.     From: Jeff Butler [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 11:44 AM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and Date er

Re: iBatis Subquery and Date error

2006-01-26 Thread Jeff Butler
My guess is that you've not really got the String format for a Date right for your database.  It is notoriously difficult to specify a String for a date.  You might try to prototype the insert statement in some interactive database client (like squirrel) to get it working before you try the iBATIS

RE: iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
PROTECTED] Sent: Thursday, January 26, 2006 10:48 AM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and Date error   Yes, iBATIS will do a toString() on the effDate in this case - because it is not a parameter for the SQL, rather it is a substitution value.   The solution

RE: iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
and remapResults. It worked for the name but not for the date.       From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 11:17 AM To: user-java@ibatis.apache.org Subject: Re: iBatis Subquery and Date error   Here are a few things to do that will not

Re: iBatis Subquery and Date error

2006-01-26 Thread Nathan Maves
Here are a few things to do that will not solve your problem but will help clean it up.1. Use the instead of 2. Don't specify "remapResults" because you dont have any :)  This option is not available in an see item #1To fix your problemuse #name# and #effDate#you are also missing the id param

Re: iBatis Subquery and Date error

2006-01-26 Thread Jeff Butler
Yes, iBATIS will do a toString() on the effDate in this case - because it is not a parameter for the SQL, rather it is a substitution value.   The solution is to put effDate into the map as a String in the format that your database understands.  In other words, you'll have to format the date yourse

iBatis Subquery and Date error

2006-01-26 Thread Bondre, Prathit
I currently have a query defined in my XML as follows       Insert into table     Select     Address,     City,     Zip,     $name$ as name,     $effDate$ as date