Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED2A3961C for ; Thu, 27 Sep 2012 19:39:08 +0000 (UTC) Received: (qmail 44974 invoked by uid 500); 27 Sep 2012 19:39:08 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 44953 invoked by uid 500); 27 Sep 2012 19:39:08 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 44944 invoked by uid 99); 27 Sep 2012 19:39:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2012 19:39:08 +0000 Date: Fri, 28 Sep 2012 06:39:08 +1100 (NCT) From: "Thomas Fox (JIRA)" To: torque-dev@db.apache.org Message-ID: <678962833.135330.1348774748861.JavaMail.jiratomcat@arcas> Subject: [jira] [Closed] (TORQUE-24) Generator doesn't generate data values correctly for BOOLEANCHAR MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TORQUE-24?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Fox closed TORQUE-24. ---------------------------- > Generator doesn't generate data values correctly for BOOLEANCHAR > ---------------------------------------------------------------- > > Key: TORQUE-24 > URL: https://issues.apache.org/jira/browse/TORQUE-24 > Project: Torque > Issue Type: Improvement > Components: Generator > Affects Versions: 3.2 > Environment: MySQL Database, JDK 1.5.0 > Reporter: Henning Schmiedehausen > Assignee: Thomas Fox > Priority: Minor > > Consider the following table description: > > > > > > >
> And the following people-data.xml file: > > > > > > Running ant -f build-torque.xml datasql creates: > INSERT INTO people (people_name,people_firstname,people_member,people_login) > VALUES ('Doe','John',true,'jdoe'); > INSERT INTO people (people_name,people_firstname,people_member,people_login) > VALUES ('User','Joe',false,'juser'); > which end up as '1' and '0' in the people_member column. However the BOOLEANCHAR Definition expects 'Y' and 'N', so using a boolean criteria does not work because both values in the boolean column (1 and 0) are interpreted correctly. WIth the example above and a booleanchar column, you will get > Criteria crit = new Criteria(); > crit.add(PeoplePeer.PEOPLE_MEMBER, true); > PeoplePeer.doSelect(crit).size() == 0 > Criteria crit = new Criteria(); > crit.add(PeoplePeer.PEOPLE_MEMBER, false); > PeoplePeer.doSelect(crit).size() == 0 > which is fun, considering the fact that there are three rows and the column is not-null... :-) > The generator should use 'Y' and 'N' for BOOLEANCHAR columns. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org