You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2005/05/08 18:14:07 UTC

cvs commit: db-torque/src/java/org/apache/torque/util VillageUtils.java

tfischer    2005/05/08 09:14:07

  Modified:    xdocs    changes.xml
               src/java/org/apache/torque/util VillageUtils.java
  Log:
  Up to now, when inserting a BIT value, Torque gave village an integer value for the bit column. This caused a problem for HSQLDB (it inserted the value false for a boolean with value true)
  This works if a boolean is given to village instead.
  Tested also for mysql and postgresql.
  
  Revision  Changes    Path
  1.156     +4 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- changes.xml	8 May 2005 15:56:49 -0000	1.155
  +++ changes.xml	8 May 2005 16:14:07 -0000	1.156
  @@ -28,6 +28,10 @@
     <body>
   
     <release version="3.2-dev" date="in CVS">
  +    <action type="fix" dev="tfischer">
  +      For inserting/updating tables with BIT columns, use booleans instead of 
  +      integers for the prepared statement used to update/insert BIT columns
  +    </action> 
       <action type="update" dev="tfischer" issue="TRQS221">
         Changed Postgres handling of boolean Values to use FALSE,TRUE instead of '0','1'
         while selecting from columns of Torque type BIT
  
  
  
  1.3       +2 -2      db-torque/src/java/org/apache/torque/util/VillageUtils.java
  
  Index: VillageUtils.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/util/VillageUtils.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- VillageUtils.java	31 Jan 2005 19:43:52 -0000	1.2
  +++ VillageUtils.java	8 May 2005 16:14:07 -0000	1.3
  @@ -195,7 +195,7 @@
           else if (obj instanceof Boolean)
           {
               rec.setValue(colName,
  -                    crit.getBoolean(key) ? 1 : 0);
  +                    ((Boolean) obj).booleanValue());
           }
           else if (obj instanceof java.util.Date)
           {
  
  
  

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