One of other major features introduced in ORM Designer 1.4.0 is inheritance support. Currently supported frameworks are PHP Doctrine and Doctrine2.
There are several ways how to create inheritance between entities.
1) Inheritance tool
If you want to use inheritance tool, first select this tool on the ribbon window:
With this tool selected click on base entity from which you want to inherit.
Next click on entity that should be derived from base entity.
Once the inheritance is created, you can configure more parameters in the Property editor.
2) Inheritance wizard
If you want to use inheritance wizard, select entity in model and use “Create Inheritance”command from ribbon tab “Editing”.
In the Create New Inheritance wizard select base and derived entity from the list of entities in the combo boxes.
You can also select type of inheritance, discriminator field and discriminator value for created inheritance. More information about additional parameters is at the end of this article.
3) Create inheritance in project tree
You can also create inheritance through project tree. Simply select entity (which will be used as the base entity for inheritance) in the project tree and select “Add Inheritance” in the context menu (right-click on the entity). New inheritance wizard will be executed after this step (same wizard as in previous step).
4) Create inheritance in entity edit window
Another way how to start “New Inheritance Wizard” is through the edit entity window. Select “Inheritance” tab in the “Edit entity” window. In this tab select “Add Inheritance” from top tool bar to start “New Inheritance Wizard”. This tab also contains list of all extending and base entities.
Inheritance Additional parameters
Type of inheritance is ORM framework dependent. For PHP Doctrine framework is available Simple inheritance, Concrete inheritance or Column aggregation inheritance. For Doctrine2 is currently available Single table inheritance and Class table inheritance.
Note: Mapped superclass isn’t currently supported, because there is no way how to define it in YAML or XML file format.