db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Campbell, Justin" <jcampb...@profilesys.com>
Subject RE: [Defaults for Timestamp]
Date Mon, 03 Mar 2003 16:07:52 GMT
Seth -

	We've found an issue with this over here, as well. I believe that
because each database implements the "now()"-type functions differently
(e.g. SQL Server uses "GetDate()"), Torque skips over it in an attempt to
remain generic. We found that if your column is a timestamp type in your XML
schema handed to the Torque-java-generator and you use the following string
(still in the XML schema): 'default=""', it will create a default of "new
Date()" in your java code. Sadly, this is the *client* date, not the
database date. If you absolutely must use the database date, you'll need to
probably change the generated code (or default it wherever you use it --
your choice).

Hope this helps.

- Justin

-----Original Message-----
From: Seth Milder [mailto:mrseth@physics.gmu.edu]
Sent: Sunday, March 02, 2003 2:25 PM
To: Turbine Torque Users List
Subject: [Defaults for Timestamp]


Hi,

Is there a way to specify in the schema to default a column to a
function call? I'm using Postgresql and there are certain timestamp
columns that I'd like to default to NOW(). Is there a way to accomplish
this?

Thanks!

-- 
Seth Milder
Department of Physics and Astronomy
MS 3f3
George Mason University
Fairfax, VA
http://www.mrseth.org
--
"Consider a spherical bear, in simple harmonic motion..." -- Professor
in the UCB physics department



---------------------------------------------------------------------
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