db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thoralf Rickert <thoralf.rick...@cadooz.de>
Subject Column names with spaces
Date Fri, 11 Apr 2008 12:38:52 GMT

Of course the list of problems with mssql doesn't stop...

I've got now a xml schema from the existing database. Some "lovely boy" decided years ago
that it would be nice to use spaces inside the column names of the database scheme. For example:
"Time after". This is not a problem if you use the special syntax "[Time after]" in a select.
But I don't have this kind of access with Torque (prove me wrong, if not). If I try to make
a Criteria, Torque quits this selection with

Malformed column name in Criteria getTableName: 'T_Stammdaten.Time after' is not of the form

Okay, actually this is an error that doesn't have something to do with the real problem. Is
there a way to setup a database specific syntax for column names. So in MySQL it would be
"`" or in MSSQL/Sybase it would be "[" and "]".

Additionally - I think the "torque" task that generates the classes should escape the spaces
if it uses the database column names to generate column constants (currently it produces

public static String TIME AFTER = "...".

Has somebody an idea, how to get around this problem?


View raw message