Re: Dealing with database level updates
[prev]
[thread]
[next]
[Date index for 2004/08/13]
On Fri, 2004-08-13 at 08:59, dan@xxxxxxxxxx.xxx wrote:
> My first thought was to have a "session_id" field in my object, and
> make this a foreign key in the database using "ON DELETE SET NULL".
> That way, when the user
> logs out, the resource will automagically become "free" again.
That should be fine. Or you could just do this from your perl code when
a user logs out.
> However, this system is clearly incompatible with Class::DBI keeping
> copied of Database data in memory :)
Class::DBI doesn't keep data in memory any differently from a standard
DBI app. It follows normal Perl scoping rules.
For example:
sub foo {
my $bar = Bar->retrieve(1);
... do something ...
}
$bar is now gone from memory.
- Perrin
|
|
Re: Dealing with database level updates
Perrin Harkins 16:35 on 13 Aug 2004
|