On Monday 10 November 2008 12:00:29 Ján ONDREJ (SAL) wrote:
> Hi,
>
> > Because it is needed by repoze.tm middleware that manages the
> > transactions for you.
> >
> > The bottomline is that you *shouldn't*  need (or even further aren't
> > allowed) to begin and commit/rollback transactions manually.
> >
> > This works for me without a hitch. Maybe you need to adjust the setup of
> > the DBSession to match whatever the current TG2 is doing (under the
> > assumption that your app has been developed over the course of a few
> > TG2-subreleases/trunk-versions)
>
> Hmm, ok. May be me english is not good enough.

No, it's fine.

> Can somebody give me an example, how to handle database errors (like
> unique key exceptions or foreign key problems) in current TG2? I have
> one project in TG1, which has been updated to run under TG2. I like
> news in TG2, but I really need to handle SQL problems some nice way
> and don't raise standard error without any description, which is
> default in TG.

I didn't read that out of your last email, but re-reading them now makes 
things clearer for me.

I've hit by that myself - unfortunately, this is actually a limitation of 
SQLAlchemy. 

See this thread I started:

http://www.mail-archive.com/sqlalchemy%40googlegroups.com/msg10918.html

So far, I've not tried the sub-transaction approach, but settled for 
the "check-before-doing-something"-approach. This of course introduces 
potentially race-conditions. We decided so far to live with them.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to