Thanks for your answer! My use case is quite the one I described. I juste removed some columns definitions. Now I was thinking about annotations. Would it be possible to hook into the process? To give the possibility to manage dynamic association names?
Is it an anti-pattern to think the RoleType as a "dependancy" of Role? There is http://php-di.org/ which is quite a good piece of code for dependancy injection, and it manage dynamic stuffs. What do you think about it? Le mardi 20 janvier 2015 13:16:16 UTC+1, Jàπ (Jasper N. Brouwer) a écrit : > > This is a tricky case to solve with Doctrine. > > You cannot use a Mapped Superclass, because you cannot reference it in an > association (you can only point to real entities). > > So inheritance (STI or CTI) is the only solution if you want to go down > this road. > > > http://doctrine-orm.readthedocs.org/en/latest/reference/inheritance-mapping.html#single-table-inheritance > > > http://doctrine-orm.readthedocs.org/en/latest/reference/inheritance-mapping.html#class-table-inheritance > > > I'm not entirely sure what your complete use-case is, but it might be wise > to consider if you want to solve it using full blown entities (in stead of > plain sql/dql). > > -- > Jasper N. Brouwer > (@jaspernbrouwer) > > > -- 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/d/optout.
