Double-click the association line on the Workspace.
or
Edit the association in the Associations dialog (Model menu | Model Items |Associations).
General Tab |
Description |
Name |
Name of the association/aggregation |
Advanced Tab |
Description |
Role |
Name of property that will be added to class |
Aggregation |
Represents an owner of the second class. |
Many |
Property created in the second class will not be of the Dispatch type but the List type, and will work as a collection. |
External |
External associations create new properties in the selected class. Uncheck the External checkbox not to create the properties. In both cases, a relationship with information about linkages is created. |
Attributes1, Attributes2 Tab |
Represent attributes that can be assigned to classes on both sides of the association or aggregation. Names of properties are defined on tab Advanced in the Role box. Every attribute may change class behavior. A list of attributes is accessible via Model menu | Attributes. |
Toad Data Modeler allows you to:
Example: You have created an entity trigger. Edit it and see the SQL tab in the Trigger Properties dialog. The SQL code has been pre-defined = particular default template has been used (according to the database). You don’t have to write the code manually for every new created trigger.
To select another than default template in object Properties dialog
Press CTRL+A to highlight all text in the text box and select another template from the Templates box.
![]()
Note: To replace one template with another, all text should be selected. Otherwise, the new template selected from the Templates box will be inserted to the position of cursor in the box. This behavior allows you to put together partial templates.
Option | Description |
---|---|
Templates | Shows all active templates for this object. |
Inserts the selected template. | |
Opens the Template Editor. |
All templates are available in Template Editor.
|
Note: Templates for Properties with SQL Code - To find out for which properties you can create the templates, see the Reference Guide and search the Supports Templates attribute. |
To open Template Editor
Select Settings | Templates.
To display templates for particular database or database version
![]()
Note: This option is available only if packages with the templates for selected database haven’t been loaded so far.
Option | Description | ||
---|---|---|---|
Commit |
Confirms changes made in the Template Editor and saves them to particular packages.
| ||
Commit and Save | Confirms changes made in the Template Editor and saves them to particular packages (.txg files). The packages are saved to your hard disk. | ||
Rollback | Cancels changes made in Template Editor. | ||
Import Toad for Oracle Templates |
Imports templates from Toad for Oracle to the Toad Data Modeler Template Editor.
| ||
Model Type |
Select a database or particular database version for which you want to display the templates.
| ||
Creates a new template. | |||
Deletes the selected template. Click Commit to confirm the deletion. | |||
Opens the Template Properties dialog. | |||
Object Category | List of objects (entities, attributes, triggers, check constraints, views, procedures etc.) with list of available SQL properties (SQL, Before Script , After Script etc.). | ||
Parent | Information on parent object | ||
Template Name | Specify any name for your template to distinguish it from others. | ||
Default | Select this checkbox to set the template as default. The template will be pre-defined in the object Properties dialog. | ||
Active |
Select this checkbox to display the template in the Templates box in the object Properties dialog.
| ||
Template | Provides a quick view on the body of the SQL code. | ||
Template body for template |
Write the SQL code to this window.
|
There are two pre-defined templates – Body and Complete. Both relate to the Generate SQL Only checkbox on tab General of object Properties dialog.
Example of default code for trigger:
BEGIN
/*trigger_body*/
END
Example of default code for trigger:
CREATE OR REPLACE TRIGGER <%<%FullName%>%>
AFTER /*BEFORE*/
INSERT /*UPDATE | DELETE*/
ON <%<%TableFullName%>%>
BEGIN
/*trigger_body*/
END
To set this property for your user templates, see the Template Properties dialog, General tab and select or clear the Generate SQL Only checkbox.
All pre-defined templates are saved in the Templates.txg file that is copied among user packages during first start-up of Toad Data Modeler.
All user templates are by default saved to My Package.txg.
Both files are stored among user packages at (default location):
C:\Documents and Settings\user name\My Documents\Toad Data Modeler\Installation name\Packages\{GUI}
Why are pre-defined templates stored in another package? - Once our team brings new pre-defined templates, you will be able to replace the old pre-defined templates with the new ones (Templates.txg). Your user templates will stay preserved in your My Package.txg.
We do NOT recommend to modify the pre-defined templates. If you do so, please remember to save the template to My Package.txg (see the Template Properties dialog, General tab, Package area.)
To change properties of a user template (e.g. location, visibility etc.)
Option | Description |
---|---|
General Tab | |
Name | Write a name of your template. |
Property Selection | Select for which database, object type and property the template should be used. |
Active Template | Select this checkbox to display the template in the Templates box in the object Properties dialog. |
Default Template | Select this checkbox to set this template as default in particular object Properties dialog. |
Generate SQL Only |
Select this checkbox to set the property Generate SQL Only enabled in the object Properties dialog. |
Package |
Select a package where you want to save the template. By default, user packages are saved to My Package.txg. |
Lock Package | Sets the ReadOnly property of the .txg file on the disk. |
Visibility Tab | Select databases and database versions for which the template should be valid and available. |
(not to display it in the combo-box in the object Properties dialog)
![]()
Note: After you reopen the Template Editor, the deleted item will be removed. The template has been deleted from the .txg package.
© 2023 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy