|
In a classes-to-entities mapping, inheritance strategy can be set to class hierarchies to control how data model will be formed and mapped with object model. In addition to the originally supported strategies Table per Class Hierarchy and Table per Subclass, VP Suite 3.3 supports an extra one, called Table per Concrete Class.
With strategy Table per Concrete Class, each concrete class within a class hierarchy is mapped to a table in ERD, with the attributes along the hierarchy mapped to columns in that table. Here is how object and data models are mapped by applying Table per Concrete Class as inheritance strategy.
Setting Inheritance Strategy
Right-click on a class within a class hierarchy and select ORM > ORM Class Detail... in the popup menu. 
Click Subclasses... beside Inheritance strategy field. 
Select the classes that we want to apply a inheritance strategy. 
Select Table per concrete class from the Inheritance Strategy drop-down menu. 
Click Apply to confirm the changes. 
Click Close to close the dialog.
Synchronizing from Object Model to Data Model
In order to create/update data model from object model, we need to synchronize from class diagram to Entity Relationship Diagram. Right-click on the Class Diagram and select Synchronize to Entity Relationship Diagram from the popup menu. Alternatively, sketch a line from left to right of the screen to form a gesture. 
Pick up a primary key for the super class. We can create a new column or select an existing column as primary key. 
Press OK to proceed. ERD is formed/updated. Each concrete class is mapped to a table in the diagram. 
 |
|
Last Updated on Thursday, 23 October 2008 06:23 |