Chapter 9 Generating Other Models from a PDM
You can set the following general generation options:
Option | Description |
---|---|
Check Model | When selected, verifies the model before generating the OOM, and stops generation if an error is found |
Save Generation Dependencies | When selected, PowerDesigner keeps track of the identity of the origin of each generated object. It is useful when merging two OOM which have been generated from the same PDM. Objects can be compared and recognized as the same object, even if the object has been modified in the merged OOM. If not selected, origin objects have no link with generated objects |
Class Prefix | Prefix for a class. It can help identify a class in a model |
O/R Mapping | When selected, allows to define the current PDM as the data source of the generated OOM and to create object correspondence between PDM and OOM. If you select the O/R mapping option, the Save Generation Dependencies option is automatically selected because O/R mapping uses object identifying numbers. You cannot deselect the Save Generation Dependencies option as long as the O/R mapping option is selected |
Convert Names into Codes | When selected, object codes are generated from names using the corresponding conversion script. This is useful when generating models with very different naming conventions since conversion macros are used to modify codes. For example a Java class attribute code may be "customerName" whereas a PDM table column may be "CUSTOMER_NAME". With this option selected, both objects will have their codes generated from their names. If you do not select this option, generated object codes will be copied from original object codes |
Enable transformations | This button is used to activate transformations during generation.
When you click this button, the Pre-generation tab appears if the source model contains transformations. You can select the transformations to execute before generation. The Extended Model Definitions tab also appears for you to select extended model definition files to attach to the generated model. These files may contain post-generation transformations, in this case, the Post-Generation tab appears to let you select the transformations you want to be executed in the generated model. If the generation is an update, and the generated model contains extended model definitions with post-generation transformations, the Post-generation tab automatically appears as soon as you click the Enable Transformations button |
For more information on conversion scripts, see chapter Managing models in the General Features Guide.
When you reverse engineer a database into a PDM and then generate an OOM with the corresponding O/R mapping, you can use the Add Package Hierarchy feature to create the appropriate packages in the OOM. You select the Add Package Hierarchy command from the object model contextual menu. For more information see chapter Generating for a language in the OOM User's Guide .
Check model before generation
If you select the Check Model option, the procedure to generate an OOM starts by checking the validity of the PDM . An OOM results when no errors are found. You can set check options by selecting Tools→Check Model.
Copyright (C) 2005. Sybase Inc. All rights reserved. |
![]() |