Re: Deleting an object on the other side of a has_a

[prev] [thread] [next] [Date index for 2004/09/02]

From: Peter Pimley
Subject: Re: Deleting an object on the other side of a has_a
Date: 12:10 on 02 Sep 2004
Fixed it! :D


Peter Pimley wrote:

> TableB (
>    id integer primary key
> ); 

[snip]

> ... a seperate process accessing the same database does not notice the 
> change, and seems to keep the old ClassB object in memory.



... what I didn't think was important enough to mention was that TableB 
also has a foreign key to TableA, and that ClassB 'has_a' ClassA.

So, I had two classes that both had has_a relationships to each other.  
The perl objects were being remembered by CDBI after I thought I was 
done with them (across browser requests in a mod_perl environment).  I 
obviously need to read up on perl references and garbage collection! :)

I've hand-written the relevant method in one direction and it's all 
working fine.

Thanks for all the help.  I've learnt how much I don't know about 
garbage collection under perl!

Peter

(message missing)

Deleting an object on the other side of a has_a
Peter Pimley 10:02 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:09 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 15:32 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:33 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 17:03 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:42 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 15:06 on 02 Sep 2004

Re: Deleting an object on the other side of a has_a
Peter Pimley 12:10 on 02 Sep 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52