[FLOW3-general] Extending a model
Dawid Pacholczyk
dpacholczyk at gmail.com
Sun Mar 13 17:23:07 CET 2011
On 13.03.2011 16:25, "Christian Müller (Kitsunet)" wrote:
> Hi Dawid,
>
> I would go about his in FLOW3 as best practice shows. If the models have
> something in common (and Person and Boss do) relate them. So having Boss
> extends Person is perfectly fine in FLOW3.
>
> Christian
>
> On 13.03.2011 14:54, Dawid Pacholczyk wrote:
>> Hello List,
>> I`m wondering on one thing
>>
>> For example I have to simillar models
>>
>> Person, Boss (lets not think about the best way of designing it but just
>> on the problem :) )
>>
>> Person and Boss can be grouped in People group OR Boss can EXTEND Person
>> object
>>
>> For example I would create a model Person with attributes: name, surname
>> And I would like to create a Boss object with attributes: name, surname,
>> region
>>
>> Both objects are simillar so normaly I would do something like this
>>
>> class Boss extends Person {
>> protected region;
>> }
>>
>> That way I don`t need to copy attributes.
>>
>> How should I manage this in FLOW3 ?
>>
>> Best regards,
>> Dawid Pacholczyk
>
Ok but what with db fields ?
How FLOW3 will react ?
Will I have one table in my DB for Person other for Boss ?? This is my
biggest problem with understanding this :(
Best regards,
Dawid Pacholczyk
More information about the FLOW3-general
mailing list