[Zope-DB] Re: Is "select for update" possible?

Michael Mauws michael.mauws at ualberta.ca
Fri Oct 31 11:02:51 EST 2003

> -----Original Message-----
> From: Matthew T. Kromer [mailto:matt at zope.com]
> Sent: Tuesday, October 28, 2003 12:06 PM
> With Zope, you can't use a FOR UPDATE clause that will not complete
> within the context of its transaction; you'll need to rewrite the app
> in such a way that it can perform the update within the scope of a
> single web request (such as by accumulating changes into a session
> variable, or by form posting them).
This is the conclusion I had arrived at, but isn't it a significant
limitation? Particularly in an enterprise context, the ability to preclude
successive UPDATEs that write over each other's changes is essential. At
present, my awkward solution has been to manually flag records as being
locked by executing an UPDATE as part of rendering the edit form. Besides
being cumbersome, the problem with this is that it requires the programmer
(i.e., me) to remember to check for locks before all updates, something
that's becoming increasingly challenging as the scale and complexity of my
application increase. It's also becoming increasingly frustrating given that
FOR UPDATE would take care of all of this were it available to me. For this
reason, I would say that the inability to use this feature surpasses the
limited access to bind variables as the most important limitations of

...michael mauws

More information about the Zope-DB mailing list