[cvs] expresso commit by lhamel: fix Henri/Raul change that broke mysql.

JCorporate Ltd jcorp at jcorporate.com
Tue Feb 22 23:36:52 UTC 2005


Log Message:
-----------
fix Henri/Raul change that broke mysql.  mysql uses longvarchar type, but IS NOT CLOB.  so for CLOB handling, test for CLOB, not just any longvarchar

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc:
        JDBCExecutor.java

Revision Data
-------------
Index: JDBCExecutor.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JDBCExecutor.java,v
retrieving revision 1.67
retrieving revision 1.68
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JDBCExecutor.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JDBCExecutor.java -u -r1.67 -r1.68
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JDBCExecutor.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dataobjects/jdbc/JDBCExecutor.java
@@ -722,7 +722,7 @@
                                     sqlCommand.append(JDBCUtil.getInstance()
                                             .formatDateTime(theObject, oneField.getName()));
                                 }
-                            } else if (oneField.isCharacterLongObjectType() || oneField.isLongObjectType()) {
+                            } else if (DBField.CLOB_TYPE.equals(oneField.getTypeString()) || oneField.isLongObjectType()) {
                                 //
                                 //If we have a CLOB object, then we will go ahead and process
                                 //it, but we execute it in a separate update
@@ -1055,7 +1055,7 @@
                                     if (oneField.isDateType()) {
                                         tmpData = theObject.getCustomStringFieldValue(myConnection, oneField.getName());
                                     } else {
-                                        if (!oneField.isLongBinaryType() && !oneField.isLongCharacterType()) {
+                                        if (!oneField.isLongBinaryType() && !DBField.CLOB_TYPE.equals(oneField.getTypeString())) {
                                             if (myConnection.isStringNotTrim()) {
                                                 tmpData = myConnection.getStringNoTrim(i);
                                             } else {


More information about the cvs mailing list