On Wed, Aug 02, 2017 at 11:30:27AM +0200, Herby VojÄÃk wrote:
Hm, I though that once I open a session it does actually connect on demand (it has Login, system and all the information for it). Does it actually mean that if I want to stay connected I must do `session login` before each `session inUnitOfWorkDo:`?
No.
As written above, I thought glorp manages this kind of reconnection itself. If not, can someone point me to the some example where this is managed? I am asking because in Glorp book I did not find anything about this (I have read it).
If used with Seaside, typically when a Seaside session is started, your application's custom subclass of WASession starts a database session, be it for Glorp, some other OODB, good olde SQL, etc. From Sven's Reddit.st: RedditSession>>glorpSession glorpSession ifNil: [ glorpSession := self newGlorpSession ]. glorpSession accessor isLoggedIn ifFalse: [ glorpSession accessor login ]. ^ glorpSession See the senders of #glorpSession. Also read the chapters of HPI's Seaside tutorial on tasks & sessions, and persistence. http://www.hpi.uni-potsdam.de/hirschfeld/seaside/tutorial Pierce