On Thursday, October 14, 2010 17:32:50 Juan Antonio Ibáñez wrote: > > To me, it doesn't look as if there is actually a sub-transaction started. > > For that, there would be needed 2 begins. > > 2 begins? Why? Does not the TG2 transaction manager init one > transaction? > I trie with a begin() before the loop and another inside without > result
Well, there is only one BEGIN to see, so you have only one level of transactions, don't you? I don't know *why* that happens, but it's a hint that something is wrong. > > > Also your above code is broken, because you don't commit the > > subtransaction. > > Commiting instead flushing doesn't work > > > There are two things to do now: > > > > - make a self-contained (no TG2!!) example the shows the wrong behavior, > > and present that at the SA mailing list. > > I'll do it > > > - forget about this overall approach. Which is IHMO the best solution. > > The integrity rules of your DB are a safety net, not means of control > > flow. Is there a reason you can't lock e.g. tables for importing? > > I need which rows fails on import stage. Yes, but they fail for a reason, don't they? Why can't you check for that reason instead of simply inserting them & let the DB fail? Diez -- You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en.

