ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Abator / oracle pb with CHAR columns
Date Thu, 03 Aug 2006 15:28:26 GMT
Well there's no understanding of DBA opinions sometimes :)

In Java (brute force):

if (value != null) {
  StringBuffer sb = new StringBuffer(value);
  while (sb.length() < 10) {
    sb.append(' ');
  }
  value = sb.toString();
}

Since rpad is database specific, I don't think I should add it to Abator.
But I suppose I could add code like the above to the domain object setter
methods for CHAR fields - configurable with an option of course.  What do
you think?

Jeff Butler





On 8/3/06, jeb001 <jeremy.jardin@gmail.com> wrote:
>
>
> In order to be performant and light, my DBA prefers use CHAR type than
> VARCHAR columns..
>
> So, I have to set that 'rpad' explicitly for each columns..
>
> Maybe Abator could set that 'rpad' for eahch Char column..
>
> I don't know how to set that in Java code, do you ?
> --
> View this message in context:
> http://www.nabble.com/Abator---oracle-pb-with-CHAR-columns-tf2045970.html#a5634205
> Sent from the iBATIS - User - Java forum at Nabble.com.
>
>

Mime
View raw message