[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-user
Subject:    Re: Insert using ORACLE systimestamp
From:       "Brendan Miller" <bmiller () dotster ! com>
Date:       2007-02-26 17:35:11
Message-ID: 20070226173511.GA378 () localhost ! localdomain
[Download RAW message or body]

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.

Brendan

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic