Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 16996 invoked from network); 14 Sep 2006 08:20:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 08:20:48 -0000 Received: (qmail 11521 invoked by uid 500); 14 Sep 2006 08:20:48 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 11493 invoked by uid 500); 14 Sep 2006 08:20:47 -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 11478 invoked by uid 99); 14 Sep 2006 08:20:47 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 01:20:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([209.237.227.198:58849] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 63/60-03813-6A019054 for ; Thu, 14 Sep 2006 01:19:50 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 03ED87142D4 for ; Thu, 14 Sep 2006 08:16:24 +0000 (GMT) Message-ID: <5235434.1158221784013.JavaMail.jira@brutus> Date: Thu, 14 Sep 2006 01:16:24 -0700 (PDT) From: "Thoralf Rickert (JIRA)" To: torque-dev@db.apache.org Subject: [jira] Commented: (TORQUE-44) Column names in generated classes are uppercase In-Reply-To: <14344174.1153128073929.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/TORQUE-44?page=comments#action_12434608 ] Thoralf Rickert commented on TORQUE-44: --------------------------------------- I think, the uppercase table names was a bug. It looks like a copy&paste error. So, if you wish to have a switch, it should be the other way round - enable the switch to have uppercase table names. But I'm not sure if it is useful to have such a switch - we have a lot of them. Where is the problem in your example? If you compare torque table name constants with a database table cell content you can use methods to make the constants uppercase (in SQL or in Java). Of course - you have to change your code. But I think, you shouldn't use the internal Torque table name constants. I think, they are just for generating appropriate SQL query statements. > Column names in generated classes are uppercase > ----------------------------------------------- > > Key: TORQUE-44 > URL: http://issues.apache.org/jira/browse/TORQUE-44 > Project: Torque > Issue Type: Bug > Components: Generator > Affects Versions: 3.1, 3.1.1, 3.2 > Reporter: Thoralf Rickert > Assigned To: Thomas Fischer > Fix For: 3.2.1 > > Attachments: patch.txt > > > The generator creates constants for the column names in tables. The content of this constants uses upper cases. > For example if you have a table like: > > > > > > > > > > > > > > > > >
> The generator creates in the corresponding BaseAddressPeer the following constants. > ... > static > { > CLASS = "address.CLASS"; > ID = "address.ID"; > POSITION = "address.POSITION"; > NAME1 = "address.NAME1"; > NAME2 = "address.NAME2"; > NAME3 = "address.NAME3"; > STREET = "address.STREET"; > ZIPCODE = "address.ZIPCODE"; > CITY = "address.CITY"; > PHONE = "address.PHONE"; > PHONE2 = "address.PHONE2"; > COUNTRY = "address.COUNTRY"; > STATE = "address.STATE"; > FAX = "address.FAX"; > EMAIL = "address.EMAIL"; > .... > but this variables should be for example "address.email". > The AddressMapBuilder.doBuild() method creates the same uppercase mapping: > public void doBuild() throws TorqueException { > ... > dbMap.addTable("address"); > TableMap tMap = dbMap.getTable("address"); > tMap.setPrimaryKeyMethod("none"); > tMap.addPrimaryKey("address.CLASS", "" ); > tMap.addPrimaryKey("address.ID", "" ); > tMap.addPrimaryKey("address.POSITION", new Integer(0) ); > tMap.addColumn("address.NAME1", "", 50 ); > tMap.addColumn("address.NAME2", "", 50 ); > tMap.addColumn("address.NAME3", "", 50 ); > tMap.addColumn("address.STREET", "", 50 ); > tMap.addColumn("address.ZIPCODE", "", 25 ); > tMap.addColumn("address.CITY", "", 60 ); > tMap.addColumn("address.PHONE", "", 40 ); > tMap.addColumn("address.PHONE2", "", 40 ); > tMap.addColumn("address.COUNTRY", "", 200 ); > tMap.addColumn("address.STATE", "", 200 ); > tMap.addColumn("address.FAX", "", 40 ); > tMap.addColumn("address.EMAIL", "", 150 ); > } -- 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