transactions

Milan Mimica milan.mimica at gmail.com
Mon Dec 19 17:00:02 UTC 2011


I have spent some time trying to use Magma properly, hoping that some
things that weren't clear at the beginning will eventually come clear. But
one thing I still don't get: transactions. I understand transaction
semantics in RDMS, but what does it mean in magma?

What is the difference between modifying an object inside and outside
transaction? This two code snippets don't show any difference.

session := ...
model := session root model.
model firstName: 'foo'.
session begin.
model lastName: 'bar'.
session commit.

session := ...
model := session root model.
session begin.
model firstName: 'foo'.
model lastName: 'bar'.
session commit.


They both commit both firstName and lastName properties, so I don't see any
use of opening and ending a transaction. Couldn't there just be a commit
message, so that you are always in a transaction, as that is how it
apparently works?


-- 
Milan Mimica
http://sparklet.sf.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20111219/c587a923/attachment.htm


More information about the Magma mailing list