> > inheritance is the worst idea for this kind of "person is a role" > relationship. >
I think you're right... Thanks for your response Le lundi 13 janvier 2014 18:49:07 UTC+1, Benjamin Eberlei a écrit : > > inheritance is the worst idea for this kind of "person is a role" > relationship. > > I would create entities trainer, empoyee, learner and all of them have a > relationship to an "account" or "person" entity. > > > On Mon, Jan 13, 2014 at 5:22 PM, Marco Pivetta <[email protected]<javascript:> > > wrote: > >> Seems pretty much a duplicate of the discussion we had the other day on >> this mailing list: >> https://groups.google.com/d/msg/doctrine-user/GniwsCJhAIg/CD_yYQUPKNMJ >> >> >> Marco Pivetta >> >> http://twitter.com/Ocramius >> >> http://ocramius.github.com/ >> >> >> On 13 January 2014 17:05, geoffroy cochard <[email protected]<javascript:> >> > wrote: >> >>> Hie, >>> >>> I would like to use inheritance in my project to do this : >>> >>> >>> - Class *Person* >>> - Class *Employee* extends *Person* >>> - Class *Trainer* extends *Person* >>> - Class *Learner* extends *Person* >>> >>> But *Person* could be an *Employee* *AND* *Trainer* not only *OR.* >>> >>> If i follow the SINGLE_TABLE or JOINED inheritance mapping, i've to use >>> an discriminator column and mapping to do inheritance and i can do only a >>> Trainer or Employee or Learner with this system. >>> I would like to work with flag : Employee (employee_flg = true), Trainer >>> (trainer_flg = true), Learner (learner_flg = true). >>> >>> I've done this with sf1/dc1 project with a column aggregation width >>> keyField / keyValue >>> >>> What do you think about ? >>> >>> Geoffroy >>> >>> -- >>> 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] <javascript:>. >>> To post to this group, send email to [email protected]<javascript:> >>> . >>> 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] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> 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.
