Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: roland23 on October 22, 2021, 06:56:39 am

Title: How to access Database property of a class with Stereotype Table?
Post by: roland23 on October 22, 2021, 06:56:39 am
I want to change the Database property of a lot of Table elements, but I somehow cannot manage to access the property.
It seems not to be available in the selected element.
Does anybody of you know how to access it?
Geerts book "Scripting EA" does not mention table dialogs in the GUI reference, so are they not available via script? I also could bot find any values considering this in the database.
Title: Re: How to access Database property of a class with Stereotype Table?
Post by: Paolo F Cantoni on October 22, 2021, 09:11:05 am
I want to change the Database property of a lot of Table elements, but I somehow cannot manage to access the property.
It seems not to be available in the selected element.
Does anybody of you know how to access it?
Geerts book "Scripting EA" does not mention table dialogs in the GUI reference, so are they not available via script? I also could bot find any values considering this in the database.
Design | Model | Manage | DBMSOptions...

HTH,
Paolo
Title: Re: How to access Database property of a class with Stereotype Table?
Post by: Geert Bellekens on October 23, 2021, 03:26:01 am
Look at Pdata2 (Miscdata) and Gentype

Geert

PS. It's Thomas' book, not mine ;)
Title: Re: How to access Database property of a class with Stereotype Table?
Post by: qwerty on October 23, 2021, 06:51:02 am
Yep, it is ;-) I wasn't mentioning that because it would go to deep into the wild. Those more tricky things are better detailed in my Inside book. Alas, (without checking since it's too late here) you can take granted what Geert tells you in almost all cases.

q.
Title: Re: How to access Database property of a class with Stereotype Table?
Post by: Richard Freggi on March 23, 2023, 02:37:38 pm
I am also in same situation these I need to generate DDL for different databases from the same physical data model.
I'm thinking of just using
UPDATE t_object SET Gentype = 'XXX'
as a simple DML command on my model, does anyone know if this is safe?  I know we should use the APIs to update the model but don't have time to learn it right now
Title: Re: How to access Database property of a class with Stereotype Table?
Post by: qwerty on March 23, 2023, 06:50:19 pm
As long as XXX is in the language datatypes this should be safe.

q.