Author Topic: Synchronise stereotype: tagged value groups  (Read 8963 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Synchronise stereotype: tagged value groups
« Reply #15 on: November 12, 2019, 01:35:42 am »
(the MDG tagged values/stereotype properties are not directly present and created by EA on demand).
You're right in that the definition of a stereotype from a technology is not stored in the database, but resides in memory.

But the tag groupings *are* stored in the database, specifically in t_xref, and they're not updated by Synchronize Stereotype.
They're taken from the stereotype definition in the technology at the time the element is created.

So just like the name of the stereotype is written into the t_object.Stereotype column, the tag groupings (and a bunch of other stuff) are written into t_xref. It's just that they then don't update when synchronizing the modified stereotype.

Peter, you should report a bug and refer to this thread.

As to the broken stereotypes, first make sure you have done all the tag grouping changes you're going to, and then if you want to be safe delete and recreate the affected elements. You can use Repository.Execute() as I outlined, but it's undocumented for a reason. You can corrupt a project beyond repair using that function, especially if you hack (and break) the magic t_xref table.

/Uffe
My theories are always correct, just apply them to the right reality.

peterc

  • Guest
Re: Synchronise stereotype: tagged value groups
« Reply #16 on: November 12, 2019, 07:11:55 pm »
It used to be a "bug" but I have checked and it seems to be fixed in V15 as the synchronise worked there. For anyone who works with an older version of EA and comes across this thread, the script and even the SQL is not too complicated (Uffe's little bit of SQL in his sample was enough for me to get it done). I chose to extract the before and after Description's for the t_xref table to do a comparison and if the SQL matches the before version then SET it to the new version.