Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 21392 invoked from network); 19 Feb 2006 14:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Feb 2006 14:53:53 -0000 Received: (qmail 34573 invoked by uid 500); 19 Feb 2006 14:53:52 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 34552 invoked by uid 500); 19 Feb 2006 14:53:51 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 34541 invoked by uid 99); 19 Feb 2006 14:53:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2006 06:53:51 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [195.134.100.72] (HELO msa.uoa.gr) (195.134.100.72) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Feb 2006 06:53:49 -0800 Received: by MSA with id 22D32B906D9FD0E8ABEB859FE37BDB286680B406 Received: from localhost (kiki.uoa.gr [195.134.100.97]) by msa.uoa.gr (8.12.11/8.12.11) with ESMTP id k1JErQ4E024074 for ; Sun, 19 Feb 2006 16:53:26 +0200 (EET) Received: from 87.203.216.99 ( [87.203.216.99]) as user antleb@mail.di.uoa.gr by webmail.uoa.gr with HTTP; Sun, 19 Feb 2006 16:53:25 +0200 Message-ID: <1140360805.43f88665eb139@webmail.uoa.gr> Date: Sun, 19 Feb 2006 16:53:25 +0200 From: antleb@di.uoa.gr To: Apache Torque Users List Subject: Bit columns in Mysql 5 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 X-UoAMSAId: 22D32B906D9FD0E8ABEB859FE37BDB286680B406 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, a couple of months ago, we had discussed the problem in mysql 5 with the bit type (the jdbc driver incorrectly reported the type as String). A couple of bug fixes were submitted and one of them was included in the new beta version of connector/j 5.0 (http://dev.mysql.com/downloads/connector/j/5.0.html). I tried the new version, but the exact same problem persisted (exception when inserting new boolean values and always returning false for bit values already in database)... I searched the source code of torque and village and came up with a torque-specific solution (actually a village-specific): in file com\workingdogs\village\Column.java add the following lines in line 178: if (this.columnTypeName.toLowerCase().equals("bit")) this.columnType = Types.BIT; in file com\workingdogs\village\Value.java replace the lines 1573-1574 with the following: return (value.equalsIgnoreCase("true") || value.equalsIgnoreCase("t") || value.equalsIgnoreCase("yes") || value.equalsIgnoreCase("y") || value.equals("1") || value.charAt(0) == 1); I don't know if it's generic enough, but it works for me ;) Antonis. PS. I am reffering to village version 2.0 used in torque 3.2 (http://www.softwareforge.de/releases/village/distributions/) --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org