- Select File > New Model to open the New Model dialog.
- Select Physical Data Model in the left-hand pane.
- Select Physical Diagram in the right-hand pane.
- Select ORACLE Version 12c in the list DBMSs.
- Click OK.
- Select Database > Edit Current DBMS.
- Right-click ORA12C::Profile\Column\Extended Attributes and select New
- Enter a name. For example, ExtAttr_1.
- Click OK to save and close the definition file.
- Click the Table tool from the toolbox to create one table.
- Double-click the table to edit it, and click the Columns to add a few columns.
- Click OK to close the property sheet.
- Select Tools > Execute Commands > Edit/Run Script, and execute the following
For Each t in ActiveModel.Tables
For Each c in t.Columns
value = c.SetExtendedAttribute(« ORA12C.ExtAttr_1 », True)
output c.GetExtendedAttribute(« ORA12C.ExtAttr_1 »)
next
next
Dim Model, XEM, ExtAttr
Set Model = CreateModel(PdFRM.cls_Model)
Set XEM = Model.ExtendedModelDefinitions.CreateNew()
XEM.Name = « MyExtendedDefinition »
XEM.Code = XEM.Name
Set ExtAttr = XEM.AddMetaExtension(PDFRM.cls_Model, Cls_ExtendedAttributeTargetItem)
ExtAttr.Name = « MyExtendedAttribute »
ExtAttr.Value = « True »
XEM.NotifyChange()
output Model.GetExtendedAttributeText(« MyExtendedDefinition.MyExtendedAttribute »)
Dim Model, XEM, Stereotype, ExtAttr1, ExtAttr2, Result
Set Model = CreateModel(PdFRM.cls_Model)
Set XEM = ActiveModel.ExtendedModelDefinitions.CreateNew()
Set Stereotype = XEM.AddMetaExtension(PdCommon.Cls_ExtendedSubObject, Cls_StereotypeTargetItem)
Stereotype.Name = « Stereotype_1 »
Set ExtAttr1 = Stereotype.AddMetaExtension(Cls_ExtendedAttributeTargetItem)
Set Result = XEM.GetMetaExtensionsForStereotype(Cls_ExtendedSubObject, « Stereotype_1 », Cls_ExtendedAttributeTargetItem)
Output Result.Count & » item(s) can be found in Profile\ExtendedSubObject\Stereotypes\Stereotype_1\Extended Attributes »
XEM.NotifyChange()
Set ExtAttr2 = Stereotype.AddMetaExtension(Cls_ExtendedAttributeTargetItem)
Set Result = XEM.GetMetaExtensionsForStereotype(Cls_ExtendedSubObject, « Stereotype_1 », Cls_ExtendedAttributeTargetItem)
Output Result.Count & » item(s) can be found in Profile\ExtendedSubObject\Stereotypes\Stereotype_1\Extended Attributes »