This is only possible in PHP with "Owner" and "Producer" being one the
subclass of the other. Also, I'm not sure if you really need a distinction
between an "Owner" and a "Producer" if they really are just person
instances. Instead, you can handle the "Person" instance differently
depending on context.

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 10 January 2014 13:18, David R <[email protected]> wrote:

> Hello,
>
> I have a trouble about model design with doctrine ORM.
>
> A product object have many owners and many producers
>
> Entity\Product :
>  - array owners        1 <===>  n Entity\Owner
>  - array producers    1 <===>  n Entity\Producer
>
> - owners  can be a Person or Company
> - producers can be a Person or Company
>
> So I would like this model
>
> - Person & Company entities extend abstract class Owner
> - Person & Company entities extend abstract class Producer
>
> In Php & Doctrine, I can not do this kind of model.
> How could I resolve this issue ?
>
> Any Idea.
>
> Thanks a lot!
> David R.
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to