Rethink your modeling, "Owner" and "Producer" are not structural Entities, they are more like a "role" which you can place as property on your Product Entity. The superclass you are looking for is "Party", which is part of the "Party pattern" described in the modeling-bible: "Enterprise Patterns and MDA" by Jim Arlow and Ila Neustadt. You can find an online version on the Safari Books site ;).
Happy modeling! Cheers On Jan 10, 2014 1:18 PM, "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.
