You would like to add an additional property to all entities which would indicate that modeling of a particular entity is not done yet and there are more things to be done before the entity is considered complete. The property could be named InProgress.
Create a simple custom property and add a checkbox to Entity Properties linked to the property. Use the following steps as a guide:
Note:If you have chosen Package other than My Package, you need to select Customize Form as option and choose the Package you have selected previously (step 2). This option is disabled by default. To enable it, go to Settings Menu | Options | Expert Mode and uncheck the Save the definitions the the 'My Package' option.
Note: If you accidentally close some of the customization forms, go to Settings Menu | Options | Expert Mode | Editable Forms and check the appropriate option to show them again.
TIP: If you want to transfer your customizations to another installation of Toad Data Modeler, simply move the package file from the Packages folder to the same folder of the target installation (e.g. "C:\Program Files (x86)\Quest Software\Toad Data Modeler 5.5\Packages\User\My Package.txg")
Why Do We Need a New Package?
Packages are containers for groups of scripts, customized Form definitions, metamodels etc. In Toad Data Modeler, the following three types of packages may exist.
User packages exist as separate XML files with extension .TXG. System packages are in binary format with extension .TBG.
You can make your modification without the necessity to create a new package, but all scripts and modifications you will ever make will be stored in the My Package.txg file. If you plan to share your modifications with others, it's a good idea to create a new package for this purpose. In this example, we will create a new package CustomerFeedback, and store all scripts used in this tutorial, metamodel and form modifications into this package. It will give us the possibility to share the CustomerFeedback.txg file with others.
Click Expert Mode| Customization | New Package or activate Package Explorer and click the New Custom Package icon.
Define Name of the package.
Select packages on which the new package depends. In this example, the Customer Feedback will not be dependent package. It will just extend existing packages.
Example of dependent package: Package RE Microsoft SQL Server 2005 depends on RE Microsoft SQL Server package and extends Microsoft SQL Server 2005 package. (RE is abbreviation for Reverse Engineering.)
Select packages you want to extend. In our example, we will be extending Database Oracle 10g package and HTML Reports for Oracle 10g.
You can write description to the Description tab.
Newly created package will appear in the Package Explorer. You can also see package extensions there. Custom packages have blue icon.
Just to compare, see My Package (where all modifications are stored if you don't use add-on packages) - it has a green icon and is listed at the top.
Well, a new package exists, let's continue adding new properties.
Properties and methods can be added visually, via Metamodel.
For our purpose, we will need two new properties.
This is where our values will be stored. The properties will be assigned to items that will appear in Entity Properties form. The ConfirmedByCustomer property value will be assigned to a checkbox, and the NotesFromCustomer value will be assigned to a text box.
Right-click the CustomerFeedback package and select Open Metamodel.
Empty metamodel digram opens.
Right-click the workspace and select Add Class...
Select class you want to extend. For our purpose, we need to extend PEREntityOR10 class.
PER - Physical Entity Relationship model.
Entity - Items must be accessible in the Entity Properties form.
OR10 - Modification will be made for Oracle 10g only.
Select the newly added class and right-click it. Select Edit.
Add two new properties to the class.
ConfirmedByCustomer, data type Boolean.
On tab Attributes of the Property Properties dialog, you can define property Attributes. Select Editable (we need to be able to edit the values) and Store Property (we want to store the values with model).
Now define the second Property NotesFromCustomer, on tab Attributes, select the same attributes - Editable and Store Property.
Properties have been added to the metamodel. Now it's necessary to save the metamodel and restart the application. Then we can continue modifying Entity Properties form.
Note: Metamodels are XML documents stored as .TXM files.