[Zope-dev] Transaction successful, but changes not pushed to disk (was) Reg. persisting data in ZODB via forms

Joe Steeve js at hipro.co.in
Wed Jun 8 05:53:18 EDT 2011


On Wed, 2011-06-08 at 11:40 +0200, Charlie Clark wrote:
> > Further, if we have to expect the developer to manually notify after
> > every change, it could invite unnecessary bugs.
> 
> Which is why you should let the library handle this for you wherever  
> possible and something you write tests for.

The problem is when we have to add multiple actions to a form, and each
of them modify the object in different ways (say). In such a case, we
cannot use the form.EditForm as is. We need to add more actions
explicitly. And, if we have to notify(IObjectModifiedEvent) everytime,
for the object to be persisted, it does not seem nice.

I would have been happy if the transaction failed completely. But, it
had not. The transaction was successful. Subsequent requests on the same
object show that the previous modifications are intact. The object's
changes just did not make it to the disk.

-- 
Joe Steeve
HiPro IT Solutions Pvt. Ltd.
http://hipro.co.in/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110608/5333b2e6/attachment-0001.bin 


More information about the Zope-Dev mailing list