[CDBI] Refresh variables for Object?

Graham Melcher melcher at rescomp.berkeley.edu
Fri Dec 15 01:12:48 GMT 2006


Hey all,

I'd like to clear the 'essential' and any other cache'd values for an
object such that they must be re-queried from the database when
accessed.  I've looked over the cpan docs and the wiki, but I can't find
that sort of function.

The reason for this that i'm iterating over the result of a rather large
query, such that the results later in the iteration may no longer be up
to date.  I could rely on the columns not being essential, or
re-retrieving the object (although I think that would simply result in
accessing the same object in memory).  I seem to remember reading about
a way to simply tell an object to clear its attributes such that they
must be re-queried, however I can't seem to find the reference.

Anyone else used a feature like this, and have somewhere to read up on
it, or, if not documentation, some hint as to where to look so I can add
it to the wiki?  Oh, if it matters, we're stuck using auto-update and
not auto-commit on postgres. 

Thanks,

Graham

-- 
 Graham Melcher
    Lead Programmer
 Residential Computing 
 University of California, Berkeley



More information about the ClassDBI mailing list