db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brendan Miller" <bmil...@dotster.com>
Subject Re: Insert using ORACLE systimestamp
Date Mon, 26 Feb 2007 17:35:11 GMT
On Sat, Feb 24, 2007 at 07:37:47PM +0100, Thomas Vandahl wrote:
> Brendan Miller wrote:
> > Is there a way for an object's .save() method to insert using Oracle's
> > SYSTIMESTAMP built-in for tables that have a timestamp field?
> I'd suggest to think about this again. In an application, the
> application server is the leading part and it should provide the
> timestamps for all records. This might not occur to you in simple
> setups, but is essential in cluster environments.

In our environment, we rely on "database time" for timestamp fields that
represent "time of insert" (either using Oracle's SYSTIMESTAMP or
MySQL's NOW()).  To overcome this, we will likely override save() to
select the current time from the database, and use that to populate the
object prior to super.save().

Thanks for the suggestions.


To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message