[ZODB-Dev] Setting the jar

Florent Guillaume fg at nuxeo.com
Thu Aug 4 16:41:53 EDT 2005


On 4 Aug 2005, at 22:11, Tim Peters wrote:
> [Florent Guillaume]
>>
>> What part of the transaction/persistence code sets the _p_jar of a
>> persistent object to that of its parent when the object is  
>> assigned to a
>> persistent parent and transaction.commit(1) is called ?
>>
>
> I'm massively overloaded today, so it would really help if you  
> could name
> the version of ZODB you're wondering about ;-).

No problem, there's no hurry.

Latest ZODB 3.4 would do (I'm maintly interested in Zope 2.8 here.

I've seen something that look like what I want in  
ZODB.Connection.Connection.add, but I can't see who calls it.

To be clear, I'm interested in how the _p_jar happens on a new object  
that's just been created. Basically if you do:
# folder is a persistent object that has a _p_jar
folder.foo = Foo() # where Foo inherits from Persistent
# here folder.foo doesn't have a _p_jar
transaction.commit(1)
# here folder.foo has a _p_jar, how come ?

I think I've missed something in my code trawling ;)

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com





More information about the ZODB-Dev mailing list