create_reference
Creates parent-child references in PowerDesigner models: generates foreign-key columns for PDMs and conceptual relationships for CDM/LDM, with optional dry-run validation.
Instructions
Create an association between two objects. In a PDM this is a foreign-key reference (parent 1--N child); if parent_columns/child_columns are omitted the parent's primary key is used and FK columns are auto-created in the child (update_key=true, e.g. user 1--N order creates order.user_id). In a CDM/LDM it is a conceptual relationship between entities: parent_table/child_table name Entity1/Entity2, parent_columns/child_columns/update_key are ignored. cardinality = multiplicity at the child end ('0,n', '1,1', '1,n'; '0..*' also accepted); parent_cardinality = multiplicity at the parent end (default '1,1'; set '0,n' on both for M:N). dependent_role marks a weak/dependent side as 'A'/'B', '1'/'2' or an entity code. Supports dry_run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model_id": "<model_id>",
"parent_table": "<parent_table>",
"child_table": "<child_table>"
},
"name": "create_reference"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| name | No | ||
| comment | No | ||
| dry_run | No | ||
| model_id | Yes | ||
| update_key | No | ||
| cardinality | No | 0,n | |
| child_table | Yes | ||
| parent_table | Yes | ||
| child_columns | No | ||
| dependent_role | No | ||
| parent_columns | No | ||
| parent_cardinality | No |