• 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
Looking for strategy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for strategy


  • Subject: Looking for strategy
  • From: Markus Ruggiero <email@hidden>
  • Date: Fri, 22 Jul 2016 15:43:20 +0200

Folks,

My app has some 50+ entities. About 2 third of them have data that is specfiic to a Region, the rest of the entities is Region agnostic.

Example:
Article toMany Descriptions
Article is Region agnostic but can have Region specific descriptions, thus Descriptions have an optional toOne to Region

Background: A user of the app is assigned a Region during login. He must be allowed to only see Region agnostic data or objects that are assigned to the current Region only.

What I want is a generic way to have something like the following SQL generated by the Frameworks:

select * from article where some_selection_criteria;  -- no region reference
select * from description where some_selection_criteria (AND REGION_ID IS NULL OR REGION_ID = A_GIVEN_REGION_ID);

This must also function for queries like: select all articles that have description for region XYZ.

I am thinking along the following lines: attach some code deep in the framework to add such a restricting clause to where for every select for any region specific table.

How would I do this? Any better ideas?

Thanks a lot
---markus---



 _______________________________________________
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


  • Follow-Ups:
    • Re: Looking for strategy
      • From: Theodore Petrosky <email@hidden>
  • Prev by Date: Re: WOAdaptor for Apache 2.4.23
  • Next by Date: Re: Looking for strategy
  • Previous by thread: Re: WOAdaptor for Apache 2.4.23
  • Next by thread: Re: Looking for strategy
  • Index(es):
    • Date
    • Thread