db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformMySQLImpl.java
Date Fri, 19 Dec 2003 22:35:11 GMT
brj         2003/12/19 14:35:11

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformMySQLImpl.java
  Log:
  prevents char[] types from being persisted as CLOBs
  patch by Michael Mogley
  
  Revision  Changes    Path
  1.8       +7 -1      db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMySQLImpl.java
  
  Index: PlatformMySQLImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMySQLImpl.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PlatformMySQLImpl.java	23 Nov 2003 10:23:29 -0000	1.7
  +++ PlatformMySQLImpl.java	19 Dec 2003 22:35:11 -0000	1.8
  @@ -93,6 +93,12 @@
                       reader = new StringReader((String) value);
                       length = (((String) value)).length();
                   }
  +                else if (value instanceof char[])
  +                {
  +                    String string = new String((char[])value);
  +                    reader = new StringReader(string);
  +                    length = string.length();
  +                }
                   else if (value instanceof byte[])
                   {
                       byte buf[] = (byte[]) value;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message