Re: How to create tables for unit tests

2009-12-10 Thread Clinton Begin
Check out the iBATIS 3 unit tests, or JPetStore 5 (which is still an iBATIS 2 implementation, but irrelevant to this topic). They all demonstrate ways of creating DB schemas for unit testing. That said, it's not an official feature of iBATIS. It is just one of many approaches (some people use An

Re: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-22 Thread Stephen Boyd
Hmm Did you try TRIM(trailing ' ' from sm_issue_symbol)? On Jan 22, 2008 4:59 PM, novotny <[EMAIL PROTECTED]> wrote: > > > Hi, > > That's what I wanted to but for whatever reason maybe because it's CHAR or > maybe because it's informix, but it doesn't trim the string so I still get > whitesp

Re: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-22 Thread novotny
Hi, That's what I wanted to but for whatever reason maybe because it's CHAR or maybe because it's informix, but it doesn't trim the string so I still get whitespace padding... :-( Jason Stephen Boyd-3 wrote: > > Why don't you change your select clause to this? > >select *trim(sm_issue_

Re: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-22 Thread Stephen Boyd
Why don't you change your select clause to this? select *trim(sm_issue_symbol) as sm_issue_symbol*, tm_id from sec_master, category_security, tier_mast where sm_secid = cs_secid and cs_tierid = tm_id and sm_issue_symbol

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-22 Thread novotny
Hi, I'm not quite sure what you mean-- this is what I have in my sql-ibatis.xml file: select sm_issue_symbol, tm_id from sec_master, category_security, tier_mast where sm_secid = cs_secid and cs_tier

RE: how to create custom TypeHandlerCallback to trim stringwhitespace

2008-01-18 Thread Sundar Sankaranarayanan
ECTED] Sent: Friday, January 18, 2008 3:23 PM To: user-java@ibatis.apache.org Subject: RE: how to create custom TypeHandlerCallback to trim stringwhitespace Well the database designer chose to use CHAR(6), so I wouldn't have this problem if it were VARCHAR but since it's CHAR, I belie

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Kezerashvili, Denis
Have you tried the other thing that I have suggested: having the callback class specified in the in the result tag in your result-map? -Original Message- From: novotny [mailto:[EMAIL PROTECTED] Sent: Friday, January 18, 2008 5:23 PM To: user-java@ibatis.apache.org Subject: RE: how to

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread novotny
Well the database designer chose to use CHAR(6), so I wouldn't have this problem if it were VARCHAR but since it's CHAR, I believe the informix driver pads it with extra spacing hence the need for some kind of custom handler which I can't get to work... Thanks, Jason Kezerashvili, Denis wrote

Re: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Stephen Boyd
Can you use a db function to trim the value before it reaches ibatis? I am not familiar with informix, but in db2 I use the rtrim() function. I am sure there must be something similar. On Jan 18, 2008 2:01 PM, novotny <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm using an informix database and

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Kezerashvili, Denis
One more point, you need the following in your sql mapping xml file, in you result map, for the column you want to trim: Replace things in [] with correct values for your use. Make sure the StringTypeHandlerCallback is either fully qualified name of defined in the typeAlias. Denis -Orig

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Kezerashvili, Denis
I think the problem may be that you are specifying jdbsType="CHAR", should not it be jdbsType="VARCHAR". Aren't you dealing with strings not just single characters. The call back is never invoked, since you get back a VARCHAR not CHAR. Denis -Original Message- From: novotny [mailto:[EMAIL

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Kezerashvili, Denis
I take it back, you are defining callback for getting values out of the db. Sorry for the misleading reply. -Original Message- From: novotny [mailto:[EMAIL PROTECTED] Sent: Friday, January 18, 2008 2:02 PM To: user-java@ibatis.apache.org Subject: how to create custom TypeHandlerCallback t

RE: how to create custom TypeHandlerCallback to trim string whitespace

2008-01-18 Thread Kezerashvili, Denis
You have only defined it for storing to the db. You need to include the following in your sql mapping file #columnToTrim,handler=StringTypeHandlerCallback# Denis -Original Message- From: novotny [mailto:[EMAIL PROTECTED] Sent: Friday, January 18, 2008 2:02 PM To: user-java@ibatis.apache

Re: how to create

2007-02-14 Thread Nathan Maves
mented. -- *From:* Nathan Maves [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, February 14, 2007 2:20 PM *To:* user-java@ibatis.apache.org *Subject:* Re: how to create Why do you want to remove that line. It should not be causing you any issues when parsing the xml fil

RE: how to create

2007-02-14 Thread Daniel Pitts
@ibatis.apache.org Subject: Re: how to create Why do you want to remove that line. It should not be causing you any issues when parsing the xml file that is generated. Nathan On 2/14/07, disalle <[EMAIL PROTECTED]> wrote: Hi all, I have a simple table (for example PERSON)

Re: how to create

2007-02-14 Thread Nathan Maves
Why do you want to remove that line. It should not be causing you any issues when parsing the xml file that is generated. Nathan On 2/14/07, disalle <[EMAIL PROTECTED]> wrote: Hi all, I have a simple table (for example PERSON) and I would like to create an xml file containing all table rows,

Re: how to create two connection pools

2006-01-20 Thread Jeff Butler
Two SqlMapConfig.xml files.   Two DAO contexts if you are using iBATIS DAO.   Jeff Butler   On 1/20/06, radha rukmani <[EMAIL PROTECTED]> wrote: Hi,   How to create two connection pools, for two different databases.   Thanks     Yahoo! PhotosRing in the New Year with Photo Calendars. Add photos

Re: how to create two connection pools

2006-01-20 Thread Larry Meadors
Create two SqlMapClient instances and pass in the properties to the builder. Larry On 1/20/06, radha rukmani <[EMAIL PROTECTED]> wrote: > Hi, > > How to create two connection pools, for two different databases. > > Thanks