• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Auto-filtering EOF queries based on the current client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-filtering EOF queries based on the current client


  • Subject: Re: Auto-filtering EOF queries based on the current client
  • From: Fabian Peters <email@hidden>
  • Date: Tue, 4 Sep 2007 18:25:02 +0000

Hi Sam,

Patrick Middleton referred to such an approach in an earlier post: <http://lists.apple.com/archives/webobjects-dev/2007/Apr/msg00622.html>

cheers,

Fabian

Am 04.09.2007 um 18:08 schrieb Sam Barnum:

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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
40e-lumo.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Auto-filtering EOF queries based on the current client (From: Sam Barnum <email@hidden>)

  • Prev by Date: Re: Auto-filtering EOF queries based on the current client
  • Next by Date: Re: Auto-filtering EOF queries based on the current client
  • Previous by thread: Re: Auto-filtering EOF queries based on the current client
  • Next by thread: Re: Auto-filtering EOF queries based on the current client
  • Index(es):
    • Date
    • Thread