[ZODB-Dev] Attempt to store an object from a foreign database connection
Геннадий Ковалев
gik@freehand.ru
Wed, 29 May 2002 19:19:10 +0400
> > Hello.
> >
> > Can you tell me where is the error? I think it is at ZODB.
> >
> > Error Type: InvalidObjectReference
> > Error Value: Attempt to store an object from a foreign database
> > connection
> This error means that a persistent object references another
> persistent
> object, but the two were not loaded from the same ZODB connection.
> This might happen if you were storing a persistent object in
> a python global
> variable, then adding a reference to it to a different
> object, in a different
> transaction. Does that help?
We found two moments:
1. When we init class:
def __init__(self, id, title):
self.id=id
self.title=title
# but no 'text' property
def Go(self):
self.text=search # here we use text property
return self.text
2. When I change
self.text=search
and set
self.text=search()
Product is stable now...