Theodore,

Do you already have a m-to-m between User and Project? Or is assumed that all 
users have access to all projects?

If all you need to do is decide who gets emails for a given project then a 
simple m-to-m will do.

i.e: User <<--emailRecipients----------projects-->> Project

Any user in the project's emailRecipients array will receive emails.

If you already have a m-to-m between User and Project, then you will want to 
add a flag on the join table (isEmailRecipient) and expose that table as an 
entity. 

But! You also will have to unflatten the m-to-m relationship and treat it like 
the individual relationships and entities that is is. EOF will cannot handle a 
flattened m-to-m relationship if you need access to the join entity.

i.e: User 
<--user--projectDetails->>ProjectUser<<--userDetails---project-->Project

How you choose to implement the UI will depend on how you end up modelling this.

D

--
David LeBer
Codeferous Software

On 2013-04-15, at 10:15 AM, Theodore Petrosky <[email protected]> wrote:

> Are there any examples of working with a many to many relationship in a D2W 
> app? I need to figure this out.
> 
> I have and entity Project and an entity User. My client has asked that I add 
> a function to allow them to choose which User(s) will get an email if the 
> Project gets changed. Of course now it is on a project by project basis!!!
> 
> So I thought I would create a many to many relationship, then each project 
> would be populated with the users that could get an email. The each user list 
> had a 'isSelecteToReceiveEmail' check box. but I dont understand where this 
> value is stored?
> 
> Is it in the ProjectUser 'union' table? I was under the impression that I 
> don't touch this table.
> 
> of course I could just make a textarea and have them type in a comma 
> separated list of email addresses.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/dleber_wodev%40codeferous.com
> 
> This email sent to [email protected]


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to