From torque-user-return-7137-apmail-db-torque-user-archive=db.apache.org@db.apache.org Thu Jul 20 11:57:00 2006 Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 72290 invoked from network); 20 Jul 2006 11:57:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jul 2006 11:57:00 -0000 Received: (qmail 33171 invoked by uid 500); 20 Jul 2006 11:56:59 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 32969 invoked by uid 500); 20 Jul 2006 11:56:59 -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 32958 invoked by uid 99); 20 Jul 2006 11:56:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 04:56:58 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [62.109.81.242] (HELO mail.cadooz.de) (62.109.81.242) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 04:56:57 -0700 Received: from [192.168.107.5] (helo=securemail.cadooz-ag.intern) by gateway.cadooz-ag.intern with esmtp (Exim 4.43) id 1G3X8t-0004jO-U8 for torque-user@db.apache.org; Thu, 20 Jul 2006 13:56:35 +0200 Received: from securemail (localhost [127.0.0.1]) by securemail.cadooz-ag.intern (Postfix) with ESMTP id C66676BC058 for ; Thu, 20 Jul 2006 13:56:36 +0200 (CEST) Received: from srv-master.cadooz-ag.intern (srv-master.cadooz-ag.intern [192.168.107.3]) by securemail.cadooz-ag.intern (Postfix) with ESMTP id B221C6BC057 for ; Thu, 20 Jul 2006 13:56:36 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5 Subject: AW: Sybase case insensitive column names Date: Thu, 20 Jul 2006 13:56:37 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Sybase case insensitive column names Thread-Index: AcapfAPUS9nUONebSTq6o0vyIhX8xQAAS/ywABYzyMAAagVIoAAdURRw From: "Thoralf Rickert" To: "Apache Torque Users List" X-TBoneOriginalFrom: "Thoralf Rickert" X-TBoneOriginalTo: "Apache Torque Users List" X-TBoneDomainSigned: false X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks. I think, that's what I couldn't find. > -----Urspr=FCngliche Nachricht----- > Von: Greg Monroe [mailto:Greg.Monroe@DukeCE.com]=20 > Gesendet: Mittwoch, 19. Juli 2006 23:59 > An: Apache Torque Users List > Betreff: RE: Sybase case insensitive column names >=20 >=20 > FWIW - Doing some quick research I found that Sybase can=20 > almost meet the SQL standards by setting the sort order to=20 > case insensitive. >=20 > See: >=20 > http://infocenter.sybase.com/help/index.jsp?topic=3D/com.sybase. > dc36556_1500/html/histserv/title.htm=20 >=20 > > -----Original Message----- > > From: Greg Monroe [mailto:Greg.Monroe@DukeCE.com] > > Sent: Monday, July 17, 2006 3:27 PM > > To: Apache Torque Users List > > Subject: RE: Sybase case insensitive column names > >=20 > >=20 > > Just a couple of quick comments. According to a quick read > > 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 > >=20 > > Also, changing the way Torque has generated column names=20 > since day one=20 > > could possibly break (badly written) application code if=20 > someone has=20 > > hardcoded this expected behaviour into it. > >=20 > > Should this be an optional generation flag? > >=20 > > > -----Original Message----- > > > From: Thoralf Rickert [mailto:thoralf.rickert@cadooz.de] > > > 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 > > > > case as they appear in the schema file. If this is not the > > > case, this > > > > is a bug. This is Torque 3.2 and you did not change > > > anything there, I > > > > 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. > > > But if you > > > > > create the classes (om) it creates the column names with > > > uppercase > > > > > letters and than there is the problem because you > > cannot make any > > > > > queries. Here is an example: > > > > > > > > > > Generated XML file (correct): > > > > > > > > > > > > > > > > primaryKey=3D"true" > > > > > required=3D"true" size=3D"2" type=3D"CHAR"/> > > > > > > > > size=3D"30" > > > > > type=3D"VARCHAR"/> > > > > > > required=3D"true" > > > > > 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 > > > and 6. 0). > > > > > 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 > > > not have a > > > > > > sybase database). The jdbc task uses the > > > DatabaseMetaData from the > > > > > > jdbc driver to get the database; if the database is > > > case sensitive > > > > > > and the DatabaseMetaData does not preserve case it is a > > > bug of the > > > > > > jdbc driver. > > > > > > > > > > > > Thomas > > > > > > > > > > > > On Thu, 13 Jul 2006, Thoralf Rickert wrote: > > > > > > > > > > > > > Hi! > > > > > > > > > > > > > > I've created a schema.xml for an existing Sybase > > > database and I > > > > > > > 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=20 > the column > > > > > > > "STATE" cannot be found (in the database it's=20 > > 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 > > > >=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:=20 > 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:=20 > torque-user-help@db.apache.org > > > > > > > > >=20 > > > >=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 > > >=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 > >=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=20 > > privileged or confidential and are intended solely for the=20 > > individual or entity to whom they are addressed. If you are=20 > > not the intended recipient you may not rely on the contents=20 > > of this email or any attachments, and we ask that you please=20 > > not read, copy or retransmit this communication, but reply to=20 > > the sender and destroy the email, its contents, and all=20 > > copies thereof immediately. Any unauthorized dissemination,=20 > > distribution or copying of this communication is strictly=20 > prohibited. > >=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 >=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