Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 86539 invoked from network); 17 Jan 2004 01:52:13 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 17 Jan 2004 01:52:13 -0000 Received: (qmail 78207 invoked by uid 500); 17 Jan 2004 01:51:56 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 78190 invoked by uid 500); 17 Jan 2004 01:51:56 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 78170 invoked by uid 500); 17 Jan 2004 01:51:56 -0000 Received: (qmail 78166 invoked from network); 17 Jan 2004 01:51:55 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 17 Jan 2004 01:51:55 -0000 Received: (qmail 86532 invoked by uid 1280); 17 Jan 2004 01:52:12 -0000 Date: 17 Jan 2004 01:52:12 -0000 Message-ID: <20040117015212.86531.qmail@minotaur.apache.org> From: mpoeschl@apache.org To: db-torque-cvs@apache.org Subject: cvs commit: db-torque/src/generator/src/java/org/apache/torque/engine/database/model Column.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N mpoeschl 2004/01/16 17:52:12 Modified: src/generator/src/test/org/apache/torque/engine/database/model DomainTest.java src/generator/src/java/org/apache/torque/engine/database/model Column.java Log: check for Platform.hasSize() in getSqlString() Revision Changes Path 1.9 +13 -3 db-torque/src/generator/src/test/org/apache/torque/engine/database/model/DomainTest.java Index: DomainTest.java =================================================================== RCS file: /home/cvs/db-torque/src/generator/src/test/org/apache/torque/engine/database/model/DomainTest.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- DomainTest.java 7 Dec 2003 12:47:37 -0000 1.8 +++ DomainTest.java 17 Jan 2004 01:52:11 -0000 1.9 @@ -3,7 +3,7 @@ /* ==================================================================== * The Apache Software License, Version 1.1 * - * Copyright (c) 2003 The Apache Software Foundation. All rights + * Copyright (c) 2003-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -195,5 +195,15 @@ assertEquals("INTEGER", col.getDomain().getSqlType()); assertEquals("cbooleanint INTEGER ", col.getSqlString()); } - + + public void testBlob() throws Exception + { + Table table = db.getTable("types"); + Column col = table.getColumn("cblob"); + assertEquals("", col.getAutoIncrementString()); + assertEquals("BLOB", col.getTorqueType()); + assertEquals("LONGBLOB", col.getDomain().getSqlType()); + assertEquals("cblob LONGBLOB ", col.getSqlString()); + } + } 1.21 +8 -5 db-torque/src/generator/src/java/org/apache/torque/engine/database/model/Column.java Index: Column.java =================================================================== RCS file: /home/cvs/db-torque/src/generator/src/java/org/apache/torque/engine/database/model/Column.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Column.java 7 Dec 2003 12:47:37 -0000 1.20 +++ Column.java 17 Jan 2004 01:52:11 -0000 1.21 @@ -3,7 +3,7 @@ /* ==================================================================== * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -576,7 +576,7 @@ if (type == null) { log.warn("SchemaType " + torqueType + " does not exist"); - type = this.DEFAULT_TYPE; + type = Column.DEFAULT_TYPE; } setType(type); } @@ -988,8 +988,11 @@ sb.append(getName()); sb.append(" "); sb.append(getDomain().getSqlType()); - sb.append(getDomain().printSize()); - sb.append(" "); + if (getPlatform().hasSize(getDomain().getSqlType())) + { + sb.append(getDomain().printSize()); + sb.append(" "); + } if (getDomain().getDefaultValue() != null) { sb.append("default "); --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org