Overview

In Entity Developer you can create the following types of inheritances: Table per Hierarchy, Table per Type, and Table per Concrete Type. On the diagram, inheritance relationships are represented as solid line connections with white arrows.

In the Table Per Hierarchy hierarchy, all hierarchy classes are mapped to the same table, containing columns for all the properties of the hierarchy and additional ones for discriminating objects of one class from another. In the course of creating a Table Per Hierarchy hierarchy in a model that was autogenerated from a database, the  autogenerated table class  will become a base class. Drag child class properties out of the parent class and, in the displayed Model Refactoring dialog box, select New derived class. Delete properties, corresponding to columns that determine the class for objects. Repeat this to create all hierarchy classes, then set a mapping condition for the classes.
In the Table Per Type hierarchy, each hierarchy class is mapped to one table. Every table provides additional details that describe a new type based on another table which is that table's parent.
In the Table Per Concrete Type hierarchy, each non-abstract hierarchy class is mapped to one table. To establish such a relationship in a model, autogenerated from a database, drag the properties which belong to the parent class from one of the generated classes and, in the displayed Model Refactoring dialog box, select New base class and enter the base class name. Then drag the corresponding properties of other generated hierarchy classes out and select Existing base class in the displayed Model Refactoring dialog box. Then set the base class inheritance modifier to Abstract and set the inheritance type to Table Per Concrete Type.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.