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
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
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_
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
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
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
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
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
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
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
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
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
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
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
@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)
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,
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
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
18 matches
Mail list logo