Hi!
You could also create an EOF stack or application instance for each
client. On load you could walk all the entities and add a restricting
qualifier.
Pierre
On Sep 4, 2007, at 8:08 PM, Sam Barnum wrote:
I'm designing a WO app where multiple clients maintain their own
discreet sets of data. However, I'd like to keep everything in a
single database.
Certain entities are "global", meaning shared among all clients. A
good example would be a table containing status names for jobs.
This is the same for all clients.
Other entities are "compartmentalized", meaning once a user from
client A logs in, he can only fetch records which are linked to
client A (never from client B). A good example would be the
"project" entity.
Now the tricky part. I'd like to automate this filtering, so I
don't have to explicitly qualify "client=A" for every fetch against
Projects I do. Ideally, a user can use a D2W interface to do a
search for projects beginning with "P", and it will only return
results for his client.
My plan is to subclass EOEditingContext, and have it apply a custom
qualifier to any fetch against a "compartmentalized" entity. I'm
already using a subclass of EOEditingContext which keeps a reference
to the logged in user, for setting "modified by" flags
automatically. Almost all EOF activity uses this custom subclass
already.
Before I implement this, I was wondering if anyone else has any
suggestions on how to implement this, or an alternate approach, or
dire words of warning. I don't think I'm breaking any EOF
commandments here, but it still feels pretty invasive.
Thanks, all!
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/webobjects-lists%40houdah.com
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]