Book a Demo

Author Topic: How to retrieve inherited (not regular) tagged values via SQL queries ?  (Read 3725 times)

opo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Hi everyone,

I'm starting to explore EA's SQL capabilities, and here is what I would like to do:

- I have a bunch of elements with stereotype "AchiMate3::ArchiMate_Device". Each of them has its own tagged values attached to it, and I have no problem retrieving those by querying the 't_objectproperties' table.
- I would also like those elements to inherit some tagged values that they share in common: to achieve that, I made them inherit from another AchiMate3::ArchiMate_Device element by using a Generalization connector. That parent element also has its own tagged values.

This way, on the 'Tags' screen of the child elements I am now able to see (in separate areas) both their own tagged values and the inherited tagged values from the parent element. Until there it looks good.

- But: I cannot seem to be able retrieve these inherited tagged values by using the t_objectproperties table, it looks like they are not in there: do you know a way to do this? Or am I misusing the tagged values inheriting process/should I make them inherit the tagged values in a different way?

Reminder: I use Archimate language, not UML: I believe the tagged values capabilities are not exactly the same.

Thanks a lot in advance for your time and answers :-),

Olivier

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to retrieve inherited (not regular) tagged values via SQL queries ?
« Reply #1 on: February 18, 2021, 03:32:00 am »
Not completely sure about your issue, but stereotype properties (aka TVs) are related to their MDG via a portion of the GUID used for them. That's calculated with a (secret!) algorithm by EA. If you happen to know the prefix (IIRC it's first 11 bytes) you can relate tag and MDG. Else you're out of luck. One way (I do it) is to create a TV manually and save the prefix for internal use.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to retrieve inherited (not regular) tagged values via SQL queries ?
« Reply #2 on: February 18, 2021, 08:45:20 am »
- But: I cannot seem to be able retrieve these inherited tagged values by using the t_objectproperties table, it looks like they are not in there: do you know a way to do this? Or am I misusing the tagged values inheriting process/should I make them inherit the tagged values in a different way?
They aren't copied, they are inherited. That means if you want to retrieve them you have to traverse all generalization relationships and query for the properties on all objects in the chain.

opo

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: How to retrieve inherited (not regular) tagged values via SQL queries ?
« Reply #3 on: February 18, 2021, 06:42:51 pm »
Thanks a lot for your answers :-)

Qwerty > I'll check what the GUID looks like and try it that way .

Eve > I was afraid it would be like this... I had already built such a query (going through the generalization relationship), it works fine but then we lose the overwriting process: when I set the same tagged value on the child object that it was for example already inheriting from the parent object, on the tagged values' window of the child object it appears only once (overwriting the other one as it should be), but the query returns both values :-(

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to retrieve inherited (not regular) tagged values via SQL queries ?
« Reply #4 on: February 18, 2021, 07:31:37 pm »
Eve > I was afraid it would be like this... I had already built such a query (going through the generalization relationship), it works fine but then we lose the overwriting process: when I set the same tagged value on the child object that it was for example already inheriting from the parent object, on the tagged values' window of the child object it appears only once (overwriting the other one as it should be), but the query returns both values :-(
You'll have to add the logic to detect that yourself as well.

Geert