Re: Question re ERAttachment
Re: Question re ERAttachment
- Subject: Re: Question re ERAttachment
- From: Paul Yu via Webobjects-dev <email@hidden>
- Date: Fri, 20 Dec 2019 08:57:54 -0500
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
> <email@hidden> 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 (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> 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