[Seaside] GOODS tutorial questions
Avi Bryant
avi at beta4.com
Tue Aug 10 08:35:47 CEST 2004
On Aug 9, 2004, at 7:45 PM, LK wrote:
> 1. Do I need to create a unique 'user' class with #login and
> #password methods.
I'm not sure what you mean here... you need a User class if you want
User objects...
> 2. Is this method usable for all GOODS access, or just for a Login
> type of situation?
>
> withEscapeContinuation: aBlock
> ^ (self db) commitWithRetry: [super withEscapeContinuation: aBlock]
All GOODS access. What it does is set up one transaction per HTTP
request, and rollback and repeat the request any time the transaction
fails. It's a very simple but generally useful default policy.
> 3. If I want to access several GOODS objects in the same session, I
> would add more session variables:
> ie. 'User', 'Logs', 'LogTypes' etc.
I don't see why you'd need more session variables, but maybe I'm
misunderstanding the question. All access to GOODS data goes through
the root object of the database. This will likely have items in it
like 'Logs' and 'LogTypes'. So you might have a method on your session
like this:
logTypes
^ self db root at: 'LogTypes'
But I don't think you'd have an instance variable just to store that.
Avi
More information about the Seaside
mailing list