Add own properties only to MsSql and Oracle entities?

Hi,
is it possible to add own properties only to MsSql and Oracle entities? I can add only classes PerModelMS05 and PERModelOR10 to the MetaModel of my package.
Regards,
Lada

Hello Lada,

We are not definitely sure whether you want to add:

  • a property that will be common for all MS SQL (MS SQL 2000, MS SQL 2005) and Oracle (Oracle9, Oracle 10, Oracle 11) models
    OR
  • a property for Oracle and another property for MS SQL.

Anyway, please read the information below.

  • Find attached a screenshot that shows how hierarchy in TDM looks like. It's an example of entities in three db platforms (other look similar).

As you can see, particular classes are created in the lowest level - see PEREntityOR9, PEREntityOR10, PEREntityMS2k, PEREntityMS05 and PEREntityMY05. Other classes are abstract ancestors that hold common properties.
Class PEREntityOR9 is created in Oracle 9, class PEREntityOR10 in Oracle 10 etc.

You can create a property on every level - it's up to you. For example: If you create a new property in PEREntityOR, it will be available in classes PEREntityOR9 and PEREntityOR10. If you create a property in PEREntityOR10, it will be only there as it has not any other inheritor.

If you want to have a common property for Oracle and MS SQL, you will have to create it on level PEREntity. Nevertheless, the disadvantage might be that the property will be available also in other databases, not only in Oracle and MS SQL. Anyway, if you do not use other databases, it won't be a problem.

If you want to add a property for all Oracle models (9, 10, 11), you can create it on level PEREntityOR.

For MS SQL database it is a bit more complicated as MS SQL 2000 and MS SQL 2005 don't have another common ancestor but PEREntity. Therefore you will have to create a property for PEREntityMS and another property for PEREntityMS2k.

  • Possibly, you are encountering some problems during adding classes to metamodel. There are two possible ways:
  1. Right-click the WS of metamodel and select Add Class. The Class Selection dialog will open. Here you can see only particular classes (not abstract classes) and the classes that of which at least one object was already created. Example: If you run TDM and do not open a model, there will be only a few classes in the Class Selection dialog. However, if you create a model e.g. for Oracle 10g db and add an entity to it, there will be more classes - e.g. PEREntityOR10 class.
  2. Click the Class icon on the toolbar and add it to WS. Edit its name and Object Type. List of objects can be found in the Reference Guide (see the Help menu). For entity, it is TOTPEREntity, value 2002 (Object Types | System Object Types).

Well, we hope the information will help you. If you have more questions, please write us back. Thanks.

Regards,

Vladka + Daril

Hello Vladka+Daril,

thank you for your answer.

I understand now that I can see classes representing entities of other databases only when at least one such a entity is created in an opened model.

I understand also that it is not possible to add PEREntity via “Add class”, because this is an abstract class.

That’s why I added a new class via the toolbar button and set
Name = TOTPEREntity
Object Type = 2002
And I added a string property with a name GeneralPropertyOfAllEntities.
Nothing else. I saved the changes and restarted the application.
No I try to add a new property to the form with entities (I have there already two own properties defined to class PEREntityMS05).
But in I don’t see the newly created property GeneralPropertyOfAllEntities in the list “DataField”.

Regards,

Lada

Hi Lada,

That's why I added a new class via the toolbar button and set
Name = TOTPEREntity
Object Type = 2002

TOTPEREntity is just a name of a constant of which value is 2002.
To the class name, pls write e.g. PEREntity, PEREntityMS, PEREntityMS05 etc.

(All class names can be found in Reference Guide. Mostly, it consists of prefix PER + object type + DB.)

Hope this helps.

Tip! - Please see the Manual | Customization - Sample chapter | Add New Properties in Metamodel.
Flash Movie:
http://modeling.inside.quest.com/entry.jspa?externalID=1699&categoryID=281

Regards,

Vladka + Daril