Hi Cameron,

Welcome to the party!  If you are currently maintaining those
timestamps via the database (e.g., via triggers), you can continue to
do that.  You just need to make sure that you specify refresh-insert
and refresh-update on the appropriate properties.  For example:

<property name="dateCreated" type="date" refresh-insert="true" />
<property name="dateModified" type="date" refresh-insert="true"
refresh-update="true" />

If you are not maintaining that data via the database or you wish not
to, you can use Transfer's event model to do it.  I wrote a blog post
quite awhile ago that describes how I do it
(http://www.silverwareconsulting.com/index.cfm/2008/5/21/My-Take-on-Transfer-ORM-Event-Model-Examples--BeforeCreate-Example).

Hopefully one of those ideas will work for you.

Cheers,
Bob

On Wed, May 27, 2009 at 1:15 PM, Cameron Childress <[email protected]> wrote:
>
> I'm a little late to the party but just getting my feet wet with
> Transfer.  I'm trying it out on an existing project that I'm updating
> and refactoring...
>
> Currently I use columns called dateModified and dateCreated in most
> tables in this app and I use the DB for datetime stamps.  I could just
> set a default value on the column, but I don't think this will work
> for me in both cases, since both are set on insert and only one of the
> two is set on update.  I could also use the client or CF server's
> datetime, but I usually prefer using the DB's datestamp so I don't
> have to worry about syncing time on all machines.
>
> Right now I am just using CF to set the datestamp, but was wondering
> if anyone had any better ideas?
>
> -Cameron
>
> --
> Cameron Childress
> Sumo Consulting Inc
> http://www.sumoc.com
> ---
> cell:  678.637.5072
> aim:   cameroncf
> email: [email protected]
>
> >
>



-- 
Bob Silverberg
www.silverwareconsulting.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

You received this message because you are subscribed to the Google Groups 
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to