[FLOW3-general] Table Inheritance

Carsten Bleicker carsten at bleicker.de
Tue Nov 20 21:17:19 CET 2012


Hi,
i want to hear you opinion about this.
as far as i remember extbase (no mailing list mistake here!) handles "table inheritance" by typoscript withoud some conditions on the parent object so i can define the storage table by myself also if the developer of the original table (parent object) does not provide this. usefull if you simply want to
extend something without contacting the developer.

in neos the ts setup for content elements acts nearly the same way by defining a "supertype".

in both cases the inheritance is defined somewhere in the child object.

but table inheritance acting the other way. the parent defines what the child does, right?
if the developer of an interesting package does not provide the table inheritance i have to contact him to implement this.
no need to do that if i am able to define something like this:

/**
* @ORM\SuperType("JOINED")
*/
class MyClass extends HisClass{}


Exactly the other way.

Example:
Found a wonderfull application wich having a Model "Human".
But this one does not have any Inheritance notated.
No chance to get the developer (holiday, whatever) so i will patch the file first and implement my stuff:
class Man extends Human{}
class Women extends Human implentents BetterHumanInterface{}
(No discussion here because of the BetterHuman implementation please :))

After 2 weeks she is back from holiday and says "no, i will not implement this. you are a sexist".
Mhh, bad for me .... wasted time :(
In this case i have to accept the words of the lady but would start thinking about the SuperType way again ;)

Kind regards
Carsten

 


More information about the FLOW3-general mailing list