[CDBI] Re: Deleted objects hanging around causing trouble?

Edward J. Sabol sabol at alderaan.gsfc.nasa.gov
Tue Aug 30 01:50:57 BST 2005


> When I do a delete followed by a create on the same table, CDBI dies
> because it tries to reuse the object that's just been deleted. That's
> bc it doesn't clear the object out of the Live_Objects cache even after
> it blesses it into Has::Been::Deleted, and the DB (SQLite) is recycling
> autoincrement id's, so the object key gets reused.

Which version of Class::DBI are you referring to? If this is a problem with
version 0.999, then I recommend you contact Tony Bowden by direct e-mail.

If you are using a version of CDBI older than 0.999 (such as 0.96), try
upgrading to 0.999. Version 0.999 has many improvements and changes to the
Live_Objects *index* (I can hear Perrin saying "first off, it's not a cache"
from all the way across the Internet right now), and it's possible that this
problem may be fixed in 0.999.

The obvious workaround in any case, I believe, is to undef the object in
question after you delete it and before you re-create it.

Hope this helps,
Ed




More information about the ClassDBI mailing list