From torque-dev-return-6894-apmail-db-torque-dev-archive=db.apache.org@db.apache.org Wed Jun 21 20:53:57 2006 Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 45357 invoked from network); 21 Jun 2006 20:53:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jun 2006 20:53:56 -0000 Received: (qmail 13741 invoked by uid 500); 21 Jun 2006 20:53:56 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 13611 invoked by uid 500); 21 Jun 2006 20:53:56 -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 13600 invoked by uid 99); 21 Jun 2006 20:53:56 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 13:53:56 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Jun 2006 13:53:55 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BA61C410008 for ; Wed, 21 Jun 2006 20:52:30 +0000 (GMT) Message-ID: <20108645.1150923150759.JavaMail.jira@brutus> Date: Wed, 21 Jun 2006 20:52:30 +0000 (GMT+00:00) From: "Thomas Fischer (JIRA)" To: torque-dev@db.apache.org Subject: [jira] Commented: (TORQUE-32) Native id-method columns in hsqldb start with 0 In-Reply-To: <5157010.1150774949778.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TORQUE-32?page=comments#action_12417185 ] Thomas Fischer commented on TORQUE-32: -------------------------------------- Verified that the problem with the "NOT NULL" still exists in the current SVN revision. > Native id-method columns in hsqldb start with 0 > ----------------------------------------------- > > Key: TORQUE-32 > URL: http://issues.apache.org/jira/browse/TORQUE-32 > Project: Torque > Type: Bug > Components: Generator > Environment: Any. > Reporter: Scott Eade > Assignee: Thomas Fischer > Priority: Minor > Attachments: Column.java.patch, HypersonicDomainTest.java.patch, Platform.java.patch, PlatformDefaultImpl.java.patch, PlatformHypersonicImpl.java.patch > > Using hsqldb with id-method native columns creates columns defined with the constraint "IDENTITY". This generated an index starting with 0. As Torque regards objects with an primary key 0 as not initialized, this can lead to problems when using relationships between tables. > To prevent this I've patched the generated string from "IDENTITY" to "GENERATED BY DEFAULT AS IDENTITY (STARTING WITH 0)". > This broke the created SQL for hsqldb tables since Torque preprends the String "NOT NULL" in front of the identity string. hsqldb does not allow this. > To change this I've patched the interface org.apache.torque.engine.platform.Platform and added a method "public getNullString(Column col)" since the PlatformHypersonicImpl needed to know if the column is a not null and if the column uses the native id-method. The default implementation of Platform delegates the call of this method to the former existing one. Only the hsqldb implementation uses more than the property notNull of the column. > The new method is now used getSqlString of class Column. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - 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