Implementation works well !
/**
* @ORM\Entity
* @ORM\Table("party")
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="type", type="string")
* @ORM\DiscriminatorMap({"company" = "Company", "person" = "Person"})
*/
abstract class Party
{
...
}
Thanks folks !
David.
Le vendredi 10 janvier 2014 13:18:17 UTC+1, David R a écrit :
>
> 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.