Toad World® Forums

Extending meta model with entity properties - failed for some dbms

Hi !

We found problems when adding own properties to the meta model (entities).

What we did:

  • we used “MyPackage” for extending the meta model for the classes “PerEntityPG90”,“PerEntityOR10” and “PeEntityMS08” (properties should be available for postgres, oracle and mssql).
  • each class is extended with two simple boolean properties.
  • after that we saved the package and restarted toad
  • having the postgres model opened, we choosed the form designer for the entity properties dialog “FmPEREntityEdit”.
  • there we added a new tab page, and on this tab we added two data checkbox controls, which we linked to our new entity properties.
  • again saving the form and restarting toad.
  • after restart we opend the postgres model and could successfully edit and save our new properties.

The problem:

  • a problem comes up, if we opened another model (oracle10 or mssql08).

  • When we open the entity property dialog, toad throws several messages like "Could not convert variant type (Olestr) into type "Double). Sometime an additional message appears “…index out of range…”.

  • With this problem coming up, the model can’t be edited, we must close toad with unsaved data.

  • In this state, we can not use toads meta model features for this function.

Is there any solution for this problem ?

Additional information:

  • running a script against the oracle or mssql database had access to the new properties in the meta model (-> as described above, the properties where correctly added to all three database types).

Thanks Reiner.

Hi,

if you wish to customize forms, please do not use MyPackage. Create new package and set Package Extensions to the databases you wish to extend (Database PostgreSQL 9.0 etc.)

If this doesn’t help and there still are some problems, please send the package to modeling@quest.com and we will test the functionality.

Regards,

Vaclav & TDM team

Hi Vaclav !

Thanks for your support, with this solution the program works.

There is one remark from us to this coding: As we wanted to have this user defined entity properties for all database which we support (and that are all versions of pg, ora, mssql,…), this may lead to much work. For each db brand/version we may create an own package, meta model extension, form definitions. Our idea was to have those definitions in a common class, where all db specifc classes derive from (effect would be coding is optimized, changes may only be done in one place…). That leads to one of our questions in that forum posted before (you wanted to create some documents in future concerning the usage of the meta model…), where we wanted to know, if it is possible to extend “basic classes”, from which the db specifics are extended from. In this case this would have been f.i. the “PerEntity” class.

Regards,
Reiner.