in reply to Re: Re: Inheritance and objects tied to a database
in thread Inheritance and objects tied to a database

I guess the alternative would be to take the save out of DESTROY, and explicitly save the data to the DB ..?

That way, a call to, say, $self->Parent::Save would save using the child data, and you can simply bypass the save when the parent is destroyed.

After all, if no changes are made in the child no save of the parental data should be needed anyway (if I'm reading this right).

Just a thought ..
-- Foxcub

Replies are listed 'Best First'.
Re: Re[3]: Inheritance and objects tied to a database
by relax99 (Monk) on Dec 20, 2002 at 12:56 UTC
    I guess I could do that. It just feels like it's a workaround only applied for the (my) lack of understanding of how to do it correctly with tie() and the inheritance mechanism.