[CDBI] Re: Error deleting object with has_many instances
dhoworth at mrc-lmb.cam.ac.uk
Wed Feb 8 12:14:21 GMT 2006
Peter Speltz wrote:
> I had installed the SVN version of Maypole which changed its
> "delete" method in the model class. I had forgotten that Maypole
> Model CDBI has a delete method. That pesky"delete" method was redone
> and failed on deletes made from a cascade but worked when there was
> no cascade.
> I always forget about those poorly named methods. I dont even know how
> to call Class::DBI 's delete. :) What would that be
> $self->SUPER->SUPER::delete? I'm cutting that method out of my copy
That's why I (and Dave B, I think) renamed Maypole's 'delete' action to
'do_delete' :) Saves a lot of aggro.
But the Maypole delete is supposed to automatically call the Class::DBI
delete instead unless it's actually called as an action. It does that
through an evil hack as it starts. Is the SVN version broken?
More information about the ClassDBI