[FLOW3-general] Abstract classes and extending objects
Ferdinand Kuhl
fcool at coolys.de
Tue Aug 16 22:29:10 CEST 2011
Hi Dawid,
just take a look at the Framework/Flow3.Party/ Package. There you'll
find an "AbstractParty" which will be the ancestor to "Person" or
"Company". Looks like exactly what you are searching for.
Basically you are totally right. You just have to use the right
docrtine - annotation. Have a look at their website. They provide
different database backed inheritance models (e.g. Joined or
Discriminated)
Have a nice evening,
Ferdinand Kuhl
Dawid Pacholczyk wrote:
> Hello List,
> I want to talk about one thing.
>
> For example I have 2 objects:
> -> Soldier
> -> Salesman
>
> They are diffrent persons but they have something in common like
name,
> surname, age etc
>
> but also some diffrent thing like for example Soldier have a rank or
> Salesman got salary
>
> Now I would like to create ABSTRACT class Person and create normal
> classes Soldier and Salesman that will extend Person. How can I do
that ?
>
> Should I just create normal models (but one as abstract class) and
use
> standard adnotations to map object ? How can I extend an object via
> doctrine ?
>
> Best regards,
> Dawid Pacholczyk
More information about the FLOW3-general
mailing list