On 12/15/06, Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
> desired:
>
>         $roseObj->timestamp_action('NOW()');
>         $roseObject->save;
>
>         > print $roseObj->timestamp_action ;
>         > 12/15/2006 11:18

Since NOW() is evaluated server-side, the only way to know what it was
actually set to is to reload that column from the db.  As you noted,
you can reload all columns as a workaround:

>         $roseObj->timestamp_action('NOW()');
>         $roseObject->save;
>         $roseObject->load;

I'm not sure what the alternative might be.  There's no getting around
having to load those values from the db after save.  Reloading just
the columns that need to be reloaded could result in an inconsistent
object.  (In both cases, there's a race, but at least reloading
everything always creates an internally consistent object.)

-John

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to