The Detail tab contains options to control the generation of model objects.
Option |
Description |
---|---|
Check Model |
Invokes a model check before generation, and stops generation if errors are found. You can configure specific model checks before generation by selecting Checking a Model. . For more information, see |
Save Generation Dependencies |
Instructs PowerDesigner to retain links between each source object and the corresponding target object, which allow objects to be subsequently identified, even if they have been modified. |
Generate Mappings |
Defines the source model as the data source of the generated model and creates mappings between all source and target objects. This option is dependent on the Save Generation Dependencies option. |
Rebuild Triggers |
[CDM-PDM and OOM-PDM only] Instructs PowerDesigner to build triggers with preservation option, after the PDM generation. Rebuild takes place after merge if you are updating an existing PDM |
Convert Names into Codes |
Instructs PowerDesigner to generate target model object codes from source model object names using the appropriate conversion script (see Name and Code Conversion Scripts). This option can be useful when generating models with very different naming conventions. If it is not selected, target object codes are generated from source object codes. For example an OOM Java class attribute code may be customerName whereas the PDM table column that you want to generate must be called CUSTOMER_NAME. By selecting this option and specifying the appropriate conversion scripts in the model options available from the General tab, you can generate your columns with appropriate codes. |
Preserve n-n relationships |
[CDM-LDM only] Specifies that many-to-many relationships created in the CDM will be generated to the LDM if the destination model permits them. |
Enable transformations |
Enables pre- and post-generation transformations. When you click this button, the Pre-generation tab is displayed if the source model contains transformations. You can select the transformations to execute before generation. The Extensions tab also is displayed for you to select extension files to attach to the generated model. These files may contain post-generation transformations, in this case, the Post-Generation tab is displayed 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 extensions with post-generation transformations, the Post-generation tab is automatically displayed as soon as you click the Enable Transformations button. |
Skip single root element |
[XSM-PDM only] Specifies to ignore a single root element and to treat its immediate child elements as multiple roots, which will be generated as tables. |
Generate columns/attributes as elements |
[PDM-XSM only], Specifies that PDM table columns are generated as child elements (instead of attributes) in the XML model. You can then set attributes to these child elements. |
Class Prefix |
Prefix for a class. It can help identify a class in a model |
The following additional options are available when generating a PDM:
Option |
Description |
---|---|
Table: Table Prefix |
Specifies a prefix for the names of generated tables. |
Table: ID column type |
[XSM-PDM only] Specifies the type to use for ID columns, and which will be used to generate xs:ID types. Default: numeric |
Index: PK index names |
Specifies the naming convention for primary keys. You can use the following variables in this and the Key index fields:
Default: %TABLE%_PK |
Index: AK index names |
Specifies the naming convention for alternate keys. You can use the following variables in this field:
The generated code of a variable is the code defined in the object property sheet, which may be truncated when generated if the code contains characters not supported by the DBMS Default: %TABLE%_AK |
Index: FK index names |
Specifies the naming convention for foreign keys, by default %REFR%_FK |
Index: FK threshold |
Specifies the minimum number of estimated occurrences of an entity necessary to create an index on a foreign key. The estimated number of occurrences can be specified in the entity property sheet. If this property is not set, foreign key indexes are generated by default. |
Reference: Update Rule |
Specifies the default update constraint for referential integrity. |
Reference: Delete Rule |
Specifies the default delete constraint for referential integrity. |
Reference: FK column name template |
Specifies the naming convention for migrated foreign keys. You can select one of the default templates from the list or enter your own using the following variables:
The following example checks the %PROLE% value; if it is equal to the parent name (which is the replacement value) then the template "%.3:PARENT%_%COLUMN%" will be used, otherwise template "%PROLE%" will be used because the user has entered a parent role for the relationship:
[%PROLE%=%PARENT%?%.3:PARENT%_%COLUMN%:%PROLE%]Customized naming templates reappear in the generation dialog box the next time you open it, but are not saved to the list of predefined templates. For more information about PowerDesigner variables, see Customizing and Extending PowerDesigner > DBMS Definition Files. |
Reference: Use template |
Controls when the FK column name template will be used. You can choose between the following radio buttons:
|
When you reverse engineer a database into a PDM and then generate an OOM, you can add an appropriate package hierarchy in the OOM by right-clicking the OOM in the Browser, selecting Add Package Hierarchy, and entering an appropriate hierarchy (for example, com.mycompany.myproduct.oom).