
Hi there, I must say I like the way this discussion is evolving. Just too bad it is spread over multiple groups (but that is my fault). So it seems people prefer to keep discussing on mailing lists rather than spend time meeting in person or virtually. Let me start with a topic that I am still not sure I understand: For quite a while, we used a patched version of #commitUntOfWorkAndContinue in order to be able to use objects once loaded in a session after a commit or rollback without having to re-read them. But this seemed to bloat images, because caches were growing and growing. And we ran into the old problem of "why can't user B see user's A's changes?". But since our object graphs can get big, we stuck with commitUnitOfWorkAndContinue and rollbackUnitOfWorkAndContinue. Until users complained about or slow server. So I made this experiment: obj := session read: MyClass where: [:ea| ea id = 1000]. obj someVariable: 50. session commitUnitOfWork; beginUnitOfWork. session refresh: obj. obj someVariable: 30. session commitUnitOfWork. obj inspect. I had expected this to fail miserably. I wasn't sure about whether it would fail at the first #refresh: or if the following commit would either fail or do an INSERT instead of an UPDATE. Surprisingly, the snippet worked. Not only did both commits correctly issue UPDATEs, the values in the object were correct at all times. My initial theory about this would be that after a commitUnitOfWork, the object in the image would be "detached" from the DB. But it isn't. I still can hardly believe it and would like to know if that is by design or accident. The refresh: is not necessary for the followng commint to understand it needs to Update, it is more to reflect changes that have been made in the DB since we read the object from the DB. Still this feels a bit strange and I wonder if we are living on a coincidence here or if this is intended behavior. Any thoughts? Joachim -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1