On Oct 9, 2005, at 10:29 AM, Patrick K. O'Brien wrote: > You know, after I sent my reply I thought "Sheesh, I'm going to look Your enthusiasm and your work is good thing for all of us. > In a nutshell, Schevo application code does not set transaction > boundaries. Instead, application code creates transaction instances, > sets their field values, and asks the database to execute them. The > database works with Durus behind the scenes to either commit or > rollback > as appropriate. So application code looks like this: > > tx = db.Person.t.create() > tx.name = 'Fred' > tx.gender = db.Gender.findone(code='M') > new_person = db.execute(tx) > > There is quite a bit more to be said about Schevo transactions, but > instead of doing it here I should really write some docs about them. > The problem I see with automatic persistence and transparent > persistence > is that the level of granularity is usually too fine, which can often > leave data in the database in an inconsistent state (from the point of > view of database integrity rules, like unique keys and such). Having > explicit transaction boundaries is better, and having explicit > transaction objects is even better still. I think I understand. Schevo supports the automatic maintenance of broad data constraints. This requires schevo applications to stick to a set of higher level (higher than setattr) operations that modify a transaction instance. The advantage of this is that the set of objects seen by an application always satisfies these constraints. In our applications, we try not to have constraints between objects. When they can't be avoided, we wrap those changes in methods that maintain the constraint. For example, if a change in the name of A requires a change in an index on B, we only change A's name through a function that also updates B's index. That works fine for us, but I can see how others would be attracted to having automatic enforcement of more formal constraints. I assume that, in the execution of a schevo transaction, you do in fact use automatic/transparent persistence. Right? If I understand it right, applications that use schevo don't actually, directly, set attributes on Persistent instances. Is that right?