[ZODB-Dev] Attempt to store an object from a foreign database connection

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 29 May 2002 14:09:39 +0100


On Wednesday 29 May 2002 2:02 pm, Gennady Kovalev wrote:
> 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

There is no obvious cause of this problem in the code you posted.

This error means that a persistent object references another persistent=20
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 glo=
bal=20
variable, then adding a reference to it to a different object, in a diffe=
rent=20
transaction. Does that help?