Sparx Systems Forum
Enterprise Architect => Suggestions and Requests => Topic started by: Bhavesh on November 27, 2009, 11:46:34 pm
-
Hello guys,
I wanted to confirm about possibility of GUID changing.
What happens when "Strip GUID" is checked?
Could it change during import/export?
Or any other way.
Thank you.
Bhavesh.
-
If you import a package with "strip guid" it will assign all new guids to all the imported elements.
Geert
-
I asked because we're doing something based on this GUID and we've exported/imported tens of packages. But it happened once recently that GUIDs were changed in XMI file.
Is it possible for GUIDs to change when somebody restores EA db backup, works in EA and exports XMI?
Thank you.
Bhavesh.
-
I'm pretty sure it can only happen when importing xmi files.
Geert
-
I wasn't going to start this thread and bother you because it has happend only once.
Thank you for reassuring me.
Thank you.
Bhavesh.
-
To summarize the GUID issue and to add what Geert said:
The GUID is unique across all elements inside a EA project (propably also outside though I have not checked this).
GUIDs never change for an element unless it is deleted and recreated.
Exporting elements also exports the GUIDs, reimporting the elements reimports them with the former GUIDs so that all references to elements are still valid and existing. New elements in the xmi file get new unique GUIDs.
Reimporting the elements with the "strip GUID" option set reimports the elements with new GUIDs (by freshly/redundantly creating those) so references from the former project are not restored.
Oliver
-
The GUID is unique across all elements inside a EA project (propably also outside though I have not checked this).
Oliver,
By the very nature of a GUID (Globally Unique Identifier) you can expect it to be unique amongst all GUID's ever created.
Theoretical there is of course a chance that two GUID's are created with exactly the same value, but I think that is as likely as me winning the lottery two weeks in a row.
Geert
-
but I think that is as likely as me winning the lottery two weeks in a row.
Actually, theoretically, if the 122 "random" digits in the GUID are truly random then I think you'd have to win a lottery with 50,000 tickets about 8 times in a row.
However, the 122 digits are not truly random and if they use an algorithm that includes the MAC address of the local computer and a single timestamp, then the likelihood of the collision is a lot higher.
But, then again, my problem is winning the lottery one time in a row. :(
bruce
-
But, then again, my problem is winning the lottery one time in a row. :(
I have that very same problem so the chances that one of us is winning the lottery once have at least doubled.
BTW, does it affect propability that I never play such things? ;)
Oliver
-
BTW, does it affect propability that I never play such things? ;)
Naa, not significantly :D
Geert
-
But, then again, my problem is winning the lottery one time in a row. :(
Well, of course, someone has to win... (but the chances are it won't be you...)
Paolo