<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>I'm about to get good at this as I'm porting an omnibase application to use glorp.  Some stuff I can tell you:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1) I tend to keep one shared read-only glorp session for most browsing.</DIV><DIV>2) I give each form its own glorp session and let the user fiddle.  If they make it through to commit, great.  But then I toss it and they get the readonly session again.</DIV><DIV>3) There is no root object.  Glorp is a relational database mapper - you query using blocks.  ie</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>user := glorpSession readOneOf: User where: [:ea | ea login = self login].</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>4) You only have to register one object - all others get saved through reachability and differences are calculated at commit time.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>5) Everything in the session that has been registered or is reachable from registered objects gets committed within a session.  A session/unitOfWork (to me they're like the same thing) is sort of its own transaction context.  You can save them in any order, but depending on how you set up locking attributes, you'll either get 'last one wins' or locking exceptions raised.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>-Todd Blanchard</DIV><BR><DIV><DIV>On Nov 20, 2006, at 11:32 AM, Ron Teitelbaum wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><O:SMARTTAGTYPE namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="City"> <O:SMARTTAGTYPE namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="place"> <DIV class="Section1"><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">All,<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">I’ve been hooking up classes to Glorp for a <ST1:CITY w:st="on"><ST1:PLACE w:st="on">Seaside</ST1:PLACE></ST1:CITY> application.  I’ve been reading what people have written about doing this and it appears that there is no support for multiple unit’s of work.  The suggestion I found was copying model changes during commit time.  Is this the current state of things?  Do I need to serialize commits, and manage changes myself at commit time for seaside applications?  I also saw a suggestion to have one unit of work, is this even feasible?  Can we register more then one root object and use the commit features of glorp to keep track of changes to simulate multiple units of work?<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">Thanks for your help!<O:P></O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial"><O:P> </O:P></SPAN></FONT></P><P class="MsoNormal"><FONT size="2" face="Arial"><SPAN style="font-size:10.0pt; font-family:Arial">Ron Teitelbaum<O:P></O:P></SPAN></FONT></P> </DIV> </O:SMARTTAGTYPE></O:SMARTTAGTYPE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Seaside mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Seaside@lists.squeakfoundation.org">Seaside@lists.squeakfoundation.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A></DIV> </BLOCKQUOTE></DIV><BR></BODY></HTML>