[CDBI] Deleted objects hanging around causing trouble?
[prev]
[thread]
[next]
[Date index for 2005/08/30]
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.
Is there a good reason for this behavior? Would it be a bad idea to
modify CDBI::_init to change:
=09unless (defined($obj =3D $Live_Objects{$obj_key}))
to: =09
=09unless ( defined($obj =3D $Live_Objects{$obj_key})
&& !$obj->isa('Class::DBI::Has::Been::Deleted') )
=20
--=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
2People Blog: http://2-people.blogspot.com/
2People site: http://www.2people.org
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
[CDBI] Deleted objects hanging around causing trouble?
Phil Mitchell 00:16 on 30 Aug 2005
|