[EMAIL PROTECTED] wrote:
Where there is need for transaction(in the conventional sense of
multiple SQL updates), I would. However, wrapping everything in a
transaction is not something I want, many times it is not needed, just
row level consistency is enough.

As for the set method, I know it is there. But we are talking about why
people concern these individual field updates, not how to get around
it.

I don't think it's just "get around it". .set() works, and I don't think it looks bad or anything. SQLObject doesn't know what your future intentions are for the object, it doesn't know if you will set one attribute or 20.

The alternative -- which is more of a "if it were so" alternative, not a very practical alternative at this point -- is explicit saves. I don't think that is any more concise or easy to use than .set(), since in both cases you are defining a set of attributes enclosed in the scope of a single update. .set() uses Python keyword syntax to do the enclosing, explicit saves use a contract between the ORM and the programmer (the "you better run save when you're finished!" contract).

--
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org

Reply via email to