db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/accesslayer StatementManager.java
Date Thu, 17 Feb 2005 14:13:46 GMT
brianm      2005/02/17 06:13:46

  Modified:    src/java/org/apache/ojb/broker/accesslayer Tag:
                        OJB_1_0_RELEASE StatementManager.java
  Log:
  Fix bug where StatementManager was not using the platform to set args on statements in some
cases. Bug identified by Terence Haddock, and patch supplied by him as well.
  
  Submitted by: Terence Haddock (thaddock@tripi.com)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.47.2.1  +5 -5      db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java
  
  Index: StatementManager.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/accesslayer/StatementManager.java,v
  retrieving revision 1.47
  retrieving revision 1.47.2.1
  diff -u -r1.47 -r1.47.2.1
  --- StatementManager.java	22 May 2004 11:24:50 -0000	1.47
  +++ StatementManager.java	17 Feb 2005 14:13:46 -0000	1.47.2.1
  @@ -529,11 +529,11 @@
               {
                   if (values[i].getValue() != null)
                   {
  -                    stmt.setObject(index, values[i].getValue(), values[i].getJdbcType().getType());
  +                    m_platform.setObjectForStatement(stmt, index, values[i].getValue(),
values[i].getJdbcType().getType());
                   }
                   else
                   {
  -                    stmt.setNull(index, values[i].getJdbcType().getType());
  +                    m_platform.setNullForStatement(stmt, index, values[i].getJdbcType().getType());
                   }
                   index++;
               }
  @@ -544,11 +544,11 @@
               {
                   if (values[i].getValue() != null)
                   {
  -                    stmt.setObject(index, values[i].getValue(), values[i].getJdbcType().getType());
  +                    m_platform.setObjectForStatement(stmt, index, values[i].getValue(),
values[i].getJdbcType().getType());
                   }
                   else
                   {
  -                    stmt.setNull(index, values[i].getJdbcType().getType());
  +                    m_platform.setNullForStatement(stmt, index, values[i].getJdbcType().getType());
                   }
                   index++;
               }
  
  
  

---------------------------------------------------------------------
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