[Zope-DB] Re: gadlfy/commit
Tue, 11 Jun 2002 19:36:26 -0700 (PDT)
the behavior observed is in a fragment like
The database-operation raises a non-unique key exception so control passes
to the <dtml-except>. The database is updated (non-unique keys be damned).
>From what you write, the <dtml-except> block has to raise and exception to
cause a rollback. That means the pattern is:
<!-- here for exception for the operation -->
<!-- report the problem -->
which seems a bit ugly, but if that's how it's done....
On Tue, 11 Jun 2002, alan runyan wrote:
> it will automatically commit if the REQUEST completes without an Exception.
> if you want to abort the commit you will need to raise an Exception.
> > I have been trying to grok the commit/rollback mechanism for Gadfly. I
> can see
> > how to do it all from Python, but I don't see how to do it from <dtml ...
> > Is it a method call on the connection object? What's the sequence?
> > data base operations, and finally either a commit or and abort.