Re: [SQLObject] Forcing cache refresh of MultipleJoins
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Ian B. <ia...@co...> - 2003-08-01 01:33:28
|
On Sun, 2003-07-27 at 20:41, Edmund Lian wrote: > I have a one-to-many relationship of the form: > > class A(SQLObject): > ... > things = MultipleJoin("B") > > class B(SQLObject): > ... > aThing = ForeignKey("A") > > > If I check what things are in A via something like aObj.things, then > delete one of the B objects that appears in the list directly via > bObj.destroySelf(), executing the aObj.things again raises a > SQLObjectNotFound error for the just deleted B instance. > > Executing aObj.things a second time works though. So there appears to be > some kind of cache synchronization issue at play here. Is there some way > to force an object to refresh it's cached values? Hmmm... I have a unit test that I think should cover this particular case (JoinTest2.test), so I suspect I won't be able to reproduce the problem. Are there transactions or threads involved? Ian |