[Zope] Re: [Zope-dev] Re: sessions in the presence of conflicts
Chris McDonough
chrism at plope.com
Tue Dec 20 06:17:18 EST 2005
Trimmed Zope-dev from this (cross-posts are bad)...
> Dennis,
> Lets just put the question out there: Does:
>
> SESSION['someKey'] = someValue
>
> Force a commited transaction?
>
> As opposed to ...
> someDict = Session['SomeKey']
> someDict['aKey'] = 'aNewValue'
Neither "forces a committed transaction", but the former directly
marks an object (the session object) as changed. The latter does not
mark any object as changed if someDict is actually a Python
dictionary and not a first-class persistent object. At the end of a
transaction, only objects that are marked as changed are re-persisted
to the database.
This is further explained in the "mutable subobjects" section of the
sessions chapter of the Zope Book on plope.com.
- C
More information about the Zope
mailing list