object cache problem
[prev]
[thread]
[next]
[Date index for 2005/05/24]
Hi,
Yesterday I noticed that one of my applications had trouble with the
object cache. After chasing the circular reference for a while in my
code I found out that it seems to be made by Class::DBI. Or not, in
which case I'd like to have pointed out what I'm doing wrong. :)
My classes are essentially this:
package Music::Artist;
use base qw(Music::DBI);
__PACKAGE__->table('artists');
__PACKAGE__->columns(Essential => qw/id name primary_cd/);
__PACKAGE__->has_a(primary_cd => 'Music::CD');
__PACKAGE__->has_many(cds => 'Music::CD');
package Music::CD;
use base qw(Music::DBI);
__PACKAGE__->table('cds');
__PACKAGE__->columns(Essential => qw/id title artist /);
__PACKAGE__->has_a(artist => 'Music::Artist');
using $artist->primary_cd->title causes the problem.
I put up an example and test case on http://tmp.askask.com/2005/05/
class_dbi.pl. After the $artist = undef; line I expected the object
cache to be empty (?)
- ask
--
http://askask.com/ - http://develooper.com/
|
object cache problem
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 10:38 on 24 May 2005
|