Book a Demo

Author Topic: How to access Database property of a class with Stereotype Table?  (Read 8904 times)

roland23

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
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.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to access Database property of a class with Stereotype Table?
« Reply #1 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
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13519
  • Karma: +573/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to access Database property of a class with Stereotype Table?
« Reply #2 on: October 23, 2021, 03:26:01 am »
Look at Pdata2 (Miscdata) and Gentype

Geert

PS. It's Thomas' book, not mine ;)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to access Database property of a class with Stereotype Table?
« Reply #3 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.

Richard Freggi

  • EA User
  • **
  • Posts: 498
  • Karma: +18/-7
    • View Profile
Re: How to access Database property of a class with Stereotype Table?
« Reply #4 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to access Database property of a class with Stereotype Table?
« Reply #5 on: March 23, 2023, 06:50:19 pm »
As long as XXX is in the language datatypes this should be safe.

q.