On Wednesday 15 August 2007 15:58, Uwe Grauer wrote: > Yes, i also think that we need something like ExplicitTransactions. > > We should do some sort of matrix for all possible cases. > The point is, the current dabo behavior doesn't support all cases. > > I can't understand why the firebird case, where i can't control the > transaction behavior, isn't enough to know that something is wrong. > How can i do a transaction over two inserts and rollback if the second > one throws an error?
Currently Dabo does insert .... commit insert .... commit and Uwe wants begin insert... insert... commit. In the general the first case works for the simple saves - IOW works with one table. But could cause issues for multi-table insert and updates. I just ran a simple test on Postgres (Postgres handles the 'begin') with the following results: Adding two records to a child table I get: insert commit insert commit What I would have expected. adding a new parent and two new children I get: insert parent insert child commit insert child commit. Larry has recently written code to support complete transactions by over riding Save() and SaveAll() for a bizObj. But we are currently treating the code as a special situation. We might have used Postgres rules or triggers but felt better about handling the transaction from code. I wonder if what Dabo is doing is all that bad? How does sqlalchemy handle the situation? Uwe could of course handle the inserts,updates,and deletes in code. -- John Fabiani _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]
