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:[EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]