db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damien Corbishley" <Damien.Corbish...@uk.intervoice.com>
Subject RE: use of schema.xml varchar sizes
Date Tue, 06 Apr 2004 13:09:53 GMT
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] 
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 :))). 

IMHO, why add extra logic that requires extra code, machine resources
and so
on? 

Cheers,
Alex 

> -----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
> 
> 
> Hi all,
> 
> in the torque db schema there are 
> size attributes for varchars:
> ...
> <column name="U_VERSION" javaName="UVersion" required="false" 
> type="VARCHAR" size="10" />
> ...
> 
> These are translated into java string 
> objects in the peer classes, 
> and the size information is gone. 
> 
> Is there a way to have the generated 
> classes consider this size when writing
> things back to db, i.e. checking for size
> and abbreviating/trimming? 
> 
> since the columns size 
> come from the db model, strings with 
> more chars will make the inserts/updates
> fail...
> 
> there should be size checking on the 
> application side, too, but an automatic
> check in the db-layer would add robustness.
> 
> What do you think?
> 
> Thanks,
> 
> Tino
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message