Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 47681 invoked from network); 17 Jul 2006 19:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Jul 2006 19:27:39 -0000 Received: (qmail 59984 invoked by uid 500); 17 Jul 2006 19:27:38 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 59970 invoked by uid 500); 17 Jul 2006 19:27:37 -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 59959 invoked by uid 99); 17 Jul 2006 19:27:37 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2006 12:27:37 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Greg.Monroe@dukece.com designates 65.112.55.73 as permitted sender) Received: from [65.112.55.73] (HELO mail.dukece.com) (65.112.55.73) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Jul 2006 12:27:35 -0700 Received: from dukece-mail3.dukece.com ([192.168.1.222]) by mail.dukece.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 17 Jul 2006 15:27:31 -0400 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Sybase case insensitive column names Date: Mon, 17 Jul 2006 15:27:10 -0400 Message-ID: <8F5843B903F59D4C8C6806BB49A39119011002A1@dukece-mail3.dukece.com> In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Sybase case insensitive column names Thread-Index: AcapfAPUS9nUONebSTq6o0vyIhX8xQAAS/ywABYzyMA= From: "Greg Monroe" To: "Apache Torque Users List" X-OriginalArrivalTime: 17 Jul 2006 19:27:31.0812 (UTC) FILETIME=[0C6C3A40:01C6A9D7] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Just a couple of quick comments. According to a quick read=20 of the SQL 99 standard, column names are supposed to be case=20 insensitive unless they are delimited. Sybase is doing=20 non-standard things here (or my interpretation could be=20 wrong 8) )=20 Also, changing the way Torque has generated column names since day one could possibly break (badly written) application code if someone has hardcoded this expected behaviour into it. Should this be an optional generation flag? > -----Original Message----- > From: Thoralf Rickert [mailto:thoralf.rickert@cadooz.de]=20 > Sent: Monday, July 17, 2006 4:45 AM > To: Apache Torque Users List > Subject: AW: Sybase case insensitive column names >=20 > Okay, I'll submit a bug report. >=20 > > -----Urspr=FCngliche Nachricht----- > > Von: Thomas Fischer [mailto:fischer@seitenbau.net] > > Gesendet: Montag, 17. Juli 2006 10:04 > > An: Apache Torque Users List > > Betreff: AW: Sybase case insensitive column names > >=20 > >=20 > > The column names in the class files should be generated in the same=20 > > case as they appear in the schema file. If this is not the=20 > case, this=20 > > is a bug. This is Torque 3.2 and you did not change=20 > anything there, I=20 > > assume ? If yes, would you mind to submit a bug report to Jira ? > >=20 > > Thomas > >=20 > > "Thoralf Rickert" schrieb am 17.07.2006 > > 09:19:17: > >=20 > > > That is correct. The JDBC task doesn't change the names.=20 > But if you=20 > > > create the classes (om) it creates the column names with=20 > uppercase=20 > > > letters and than there is the problem because you cannot make any=20 > > > queries. Here is an example: > > > > > > Generated XML file (correct): > > > > > > > > > > > required=3D"true" size=3D"2" type=3D"CHAR"/> > > > > size=3D"30"=20 > > > type=3D"VARCHAR"/> > > > > > type=3D"INTEGER"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
> > > > > > Generated constants in the BaseAddressPeer (incorrect): > > > > > > static > > > { > > > CLASS =3D "address.CLASS"; > > > ID =3D "address.ID"; > > > POSITION =3D "address.POSITION"; > > > NAME1 =3D "address.NAME1"; > > > NAME2 =3D "address.NAME2"; > > > NAME3 =3D "address.NAME3"; > > > STREET =3D "address.STREET"; > > > ZIPCODE =3D "address.ZIPCODE"; > > > CITY =3D "address.CITY"; > > > PHONE =3D "address.PHONE"; > > > PHONE2 =3D "address.PHONE2"; > > > COUNTRY =3D "address.COUNTRY"; > > > STATE =3D "address.STATE"; > > > FAX =3D "address.FAX"; > > > EMAIL =3D "address.EMAIL"; > > > .... > > > > > > > > > I think the uppercase column names or uppercase because > > it's better to > > > read (?). There is no bug in the Sybase JDBC driver (5.5=20 > and 6. 0).=20 > > > I've tested a generated SQL statement on the sybase console > > > (isql) and it fails if the case is not correct, for example: > > > > > > SELECT .... FROM address WHERE address.CITY=3D"Hamburg" > > > > > > failes, but with address.city=3D"..." everything is okay. I > > think this > > > case sensitive behaviour is a Sybase-"feature"... Maybe I > > should ask > > > someone on a Sybase JDBC mailinglist howto disable this behaviour. > > > > > > Bye > > > Thoralf > > > > > > > > > > -----Urspr=FCngliche Nachricht----- > > > > Von: Thomas Fischer [mailto:tfischer@apache.org] > > > > Gesendet: Samstag, 15. Juli 2006 09:10 > > > > An: Apache Torque Users List > > > > Betreff: Re: Sybase case insensitive column names > > > > > > > > > > > > Hi, > > > > > > > > This is strange; the jdbc task should preserve the case > > of the table > > > > and column names (I checked that using mysql; as I do=20 > not have a=20 > > > > sybase database). The jdbc task uses the=20 > DatabaseMetaData from the=20 > > > > jdbc driver to get the database; if the database is=20 > case sensitive=20 > > > > and the DatabaseMetaData does not preserve case it is a=20 > bug of the=20 > > > > jdbc driver. > > > > > > > > Thomas > > > > > > > > On Thu, 13 Jul 2006, Thoralf Rickert wrote: > > > > > > > > > Hi! > > > > > > > > > > I've created a schema.xml for an existing Sybase=20 > database and I=20 > > > > > was able to generate the corresponding java classes. If > > I try to > > > > > make a query with them I run into a problem. The database uses > > > > case sensitive > > > > > column names but torque generates uppercase column names. > > > > For example > > > > > the following query throws an exception, because the column=20 > > > > > "STATE" cannot be found (in the database it's called "state"). > > > > > > > > > > SELECT states.STATE FROM states ORDER BY states.STATE ASC > > > > > > > > > > Is there a way to handle this? Is there a sybase specific > > > > connection > > > > > setting or something like that? > > > > > > > > > > Thanks > > > > > Thoralf > > > > > > > > > > > > > > > > > > >=20 > > -------------------------------------------------------------------- > > > > - > > > > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > > > > For additional commands, e-mail:=20 > torque-user-help@db.apache.org > > > > > > > > > > > > > > > > > >=20 > > -------------------------------------------------------------------- > > > > - > > > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > > > For additional commands, e-mail: torque-user-help@db.apache.org > > > > > > > > > > > > > > > > >=20 > >=20 > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > > For additional commands, e-mail: torque-user-help@db.apache.org > > > > >=20 > >=20 > >=20 > --------------------------------------------------------------------- > > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > > For additional commands, e-mail: torque-user-help@db.apache.org > >=20 > >=20 >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >=20 >=20 Duke CE Privacy Statement Please be advised that this e-mail and any files transmitted with it are = confidential communication or may otherwise be privileged or = confidential and are intended solely for the individual or entity to = whom they are addressed. If you are not the intended recipient you may = not rely on the contents of this email or any attachments, and we ask = that you please not read, copy or retransmit this communication, but = reply to the sender and destroy the email, its contents, and all copies = thereof immediately. Any unauthorized dissemination, distribution or = copying of this communication is strictly prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org