Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 11845 invoked from network); 6 Apr 2004 13:33:54 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 6 Apr 2004 13:33:54 -0000 Received: (qmail 85015 invoked by uid 500); 6 Apr 2004 13:33:40 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 84981 invoked by uid 500); 6 Apr 2004 13:33:40 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 84898 invoked from network); 6 Apr 2004 13:33:39 -0000 Received: from unknown (HELO mail.hpc-hamburg.de) (217.110.121.208) by daedalus.apache.org with SMTP; 6 Apr 2004 13:33:39 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: AW: use of schema.xml varchar sizes Date: Tue, 6 Apr 2004 15:30:14 +0200 Message-ID: <96F363742E3BAF4EBE5EA6A846DA14B417EE81@mail.hpc-hh.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: use of schema.xml varchar sizes thread-index: AcQb2A3LBPd0E2wlSOeXxpjD5lpq8AAABbnAAACcNVA= From: "Sperlich, Tino" To: "Apache Torque Users List" 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 Hi, at least Oracle returns a nice=20 Exception stating "...value too long...". Waiting for an SQLException to occur is no option, of course :-) we have now also implemented the logic higher up the chain for the same reason. (why would one want to move away from=20 torque...) Thanks, Tino =20 -----Urspr=FCngliche Nachricht----- Von: Damien Corbishley [mailto:Damien.Corbishley@uk.intervoice.com] Gesendet: Dienstag, 6. April 2004 15:10 An: Apache Torque Users List Betreff: RE: use of schema.xml varchar sizes I know from experience that in Sybase ASE versions 11.X upwards, that it simply truncates any strings longer than the column definition, I'm not sure if that behaviour occurs in any other RDMS flavours. I've come across the same problem ourselves, but have decided to do the logic somewhere else in the chain. This has the benefit of allowing us to move away from storing data using torque, but keeping our restraint checking. Damien -----Original Message----- From: Alexandru Dovlecel [mailto:alexandru.dovlecel@siemens.com]=20 Sent: 06 April 2004 14:07 To: 'Apache Torque Users List' Subject: RE: use of schema.xml varchar sizes You will get the errors as SQLEXception from the database system :))).=20 IMHO, why add extra logic that requires extra code, machine resources and so on?=20 Cheers, Alex=20 > -----Original Message----- > From: Sperlich, Tino [mailto:t.sperlich@hpc-hamburg.de] > Sent: Tuesday, April 06, 2004 3:56 PM > To: Apache Torque Users List > Subject: use of schema.xml varchar sizes >=20 >=20 > Hi all, >=20 > in the torque db schema there are=20 > size attributes for varchars: > ... > type=3D"VARCHAR" size=3D"10" /> > ... >=20 > These are translated into java string=20 > objects in the peer classes,=20 > and the size information is gone.=20 >=20 > Is there a way to have the generated=20 > classes consider this size when writing > things back to db, i.e. checking for size > and abbreviating/trimming?=20 >=20 > since the columns size=20 > come from the db model, strings with=20 > more chars will make the inserts/updates > fail... >=20 > there should be size checking on the=20 > application side, too, but an automatic > check in the db-layer would add robustness. >=20 > What do you think? >=20 > Thanks, >=20 > Tino >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org