Markus

I would avoid touching the ERAttachment model itself, so I would model a many 
to many association from person to erattachment.  And then if you need another 
attribute on the association eg isPrimary you can add it there

Sent from my iPhone
Please excuse iOS autocomplete 

> On Dec 20, 2019, at 8:44 AM, Markus Ruggiero via Webobjects-dev 
> <webobjects-dev@lists.apple.com> wrote:
> 
> Started to have a closer look at ERAttachment. Am a bit confused though. 
> There is a nice example in the package doc that explains how to attach an 
> avatar picture to a person. This is modelled as a Person toOne ERAttachment. 
> But what if a person has more than one image or document? This would then 
> require a Person toMany ERAttachments relationship and a foreign key personID 
> on ERAttachment. Is this kind of relationship allowed? Is ERAttachment able 
> to handle something like this? How would I find all the attachments for a 
> given Person?
> 
> Thanks for clarification.
> ---markus---
> 
> 
> _______________________________________________
> 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:
> https://lists.apple.com/mailman/options/webobjects-dev/pyu%40mac.com
> 
> This email sent to p...@mac.com

 _______________________________________________
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:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to