On 10/10/07, George Hartzell <[EMAIL PROTECTED]> wrote: > - As written, it almost works. I'm clearly running around behind > the back of RDBO's copy of that row's values, $new_num->counter is > still zero even though the row has been updated. What's the > cleanest way to fix this?
Is there really anything to fix? The in-memory and in-db states will never be guaranteed to match under any circumstances, including this one :) > - Is there a better way for me to use the single sql statement to > update the counter value? If your db supports them, a proper sequence or stored procedure would better encapsulate this kind of thing. > - Can anyone shed any light on the Scalar::Defer trick that John > mentions? In particular, when would that code run? It'll run when the default value for that column is requested and the column value is undef. (There will eventually be an option to get the default only when the column value has never been set.) To get a feel for when it runs, set the default value to something like this: default => defer { print "Getting default\n"; 123 } -John ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object