9
« on: July 08, 2023, 12:33:09 am »
I want to implement a piece of code (outside EA and the API) that creates directly in the database an Element. The element is of a given stereotype defined in a profile in a custom MDG.
So, I have to insert into the database the suitable data for t_object (the Element), t_xref (the Tag value grouping and stereotypes) and t_objectproperties (the tag values). But I have noticed that generating random GUIDs for the tag values generates some problems in the resulting element because the tags don't get grouped and are only visible in the tag section of the Properties window, instead of be visible in the main Properties tab.
I have also noted that all the elements generated manually (using EA) have some coincidences in some parts of the tag value GUID. I mean, if I have several tag values defined in the stereotype (city, company, category, etc), all the "city" tag values for different elements share some section of the GUID. Also, any of the tag values defined in the same profile (or MDG) share some other section of the GUID.
In a given GUID structure like this: {AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE}
All the tag values of elements with stereotypes belonging to the same MDG/profile, shares the AAAAAAAA section.
All the tag values with the same name (city, company, category, etc), shares the BBBB-CCCC sections
Only DDDD-EEEEEEEEEEEE seems to be randomly generated.
Does anybody know the rule to calculate AAAAAAAA and BBBB sections of the GUID for a tag value?