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

Joe Steeve <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Organization HiPro IT Solutions Pvt. Ltd.
Message-ID <1307526798.2040.31.camel@lark>
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/

_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEABECAAYFAk3vRo4ACgkQ6FrXDx3swEOUPQCfQmWxiKT/7mSUpa75XnHFPGyN
qgcAn245vngqv5IdYYD+Ale58+XZd4bL
=4maA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.