Sean CazzellCazzell wrote:
> There has been a lot of interest on the list of having a way to
> automatically wrap a request in a transaction.  The most obvious way to
> do this is to add it into expose.  Michele has done a great job putting
> together the relevant information (with suggestions frBickingBicking) on
> ticket #80 here:
>
> http://trac.turbogears.org/turbogears/ticket/80
>

Thanks Sean for taking into this ticket.

> Since I am already doing some hacking on expose 
> (movivalidatorvalidatorinputform
inputforminputformcorators) I thought I'd
> pick this one up.
>
> My question is - do we want this on by default, or do we want to
> explicitly enable it with a parameter to expose?
>
> Enabled by default (must explicitly disable):
> @expose(transaction=False)
>
> Disabled by default (must explicitly enable):
> @expose(transaction=True)
>
> Obviously the latter is backwards compatible, but if everyone is going
> to want a transaction for all of their controller methods, maybe it
> should be enabled by default?
>

I vote for making it disabled by default, since you will only use this
when you are saving to the db having:

@expose(transaction=True)

is more explicit, and (as you noted) backwards compatible.

> 
> Sean

Ciao
Michele

Reply via email to