[Seaside] Slightly OT -- Glorp session question..
boris at deepcovelabs.com
Fri Jun 30 16:31:10 UTC 2006
I'm not sure what you mean by session knowing the tables. You can use the
session to query your domain objects via,
self session readManyOf: User
self session readManyOf: User where: [:usr | user username = supplied]
But I suspect I may be missing something, so if you could clarify your
question, that would help,
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
boris at deepcovelabs.com
This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Rick Flower
Sent: Friday, June 30, 2006 9:20 AM
To: The Squeak Enterprise Aubergines Server - general discussion.
Subject: [Seaside] Slightly OT -- Glorp session question..
I'm posting this question here and on the Glorp mailing list
(separately) to improve my chances of getting a reply..
(hopefully), so I hope you'll bear with me.. I've got a Seaside App that
needs to read various things from
various PostgreSQL tables using Glorp.. So, I've got all of my
descriptors setup for my >10 tables I need
access to.. So far my Glorp session only knows about my "users" table
which it uses to perform login
validations. That code works great and can validate all day long..
However, I now have some other code that needs to lookup a list of state
(e.g. CA,AZ,UT,NV,etc) and I'm a bit confused about how to go about
getting that descriptor plugged
into my Glorp session.. I'd rather NOT open another database connection
if at all possible (I'd hate
to have one db connection for each table I'm talking to -- way too much
overhead) and am wondering
if I need to redefine my Glorp session code to know about ALL of my
tables instead of a single one?
Or, can I hijack the "users" Glorp session and temporarily ask it to
talk to another set of descriptors at
my discretion? I've read through the tutorials I've found but most were
geared towards only talking to
one table at a time or perhaps one table with a foreign key to another,
but I didn't see any examples
on IF you had two or more separate (unrelated for the most part) tables
and how to setup Glorp
to talk to those disparate tables at different times within the same
database session. I've also review the
Glorp unit tests and didn't see anything similar to what I'm asking
about above, but did find a few
things that looked close to what I want to do..
Any insight or pointers you can provide would be greatly appreciated!
Seaside mailing list
Seaside at lists.squeakfoundation.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3370 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060630/21b5b2d6/smime.bin
More information about the Seaside