class T { protected $commonField1; protected $commonField2; } class GT extends T { protected $otherField1; protected $otherField2; }
class FT extends T { protected $otherField3; protected $otherField4; } This is for plain PHP... If you need to implement that in Doctrine 2 you just need to decide if you want to use an @MappedSuperclass or a single or joined table inheritance type :) Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 14 June 2011 14:47, Jérémy Simonklein <jeremy.simonkl...@gmail.com>wrote: > Hi all, > > I would want to create 2 different classes "GT" and "FT" from a parent > class "T". > I want GT and FT to have same attributes thant T, but FT and GT should have > two additionnal different attributes. > How can I do it ? > I've searched for "doctrine inheritance" but nothing about it for Symphony > 2... > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en