Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: xkrystof on December 12, 2007, 07:25:23 am
-
Please,
could someone clarify me the difference between
ID and GUID?
When should not be ID used?
We have stored out project in database with plenty of models: use-case, data model, etc. Is it OK to use for searchong elments and packages ID???
Thanks
-
A GUID is valid across several models. An ID just within a single one.
-
is it valid in a single project?
-
Both are valid in a single project. You can use the one that works best for your purposes.
Remember that EA will assign the ID property via a counter. There may be several counters, for diagrams, elements, connectors, and so forth. In any given model an ID is unique (within its category). A GUID is unique across all categories, and across all models.
-
Thanks for your repplies!
It helped ...
-
It's important to realize that if you export your model to XMI then re-import it (without the "strip GUIDs") option:
- You WILL get new ID's
- You WILL KEEP the old Guid's
If you do any sort of integration with external systems you'll want to use the GUID.
Eric
-
One might also note that an ID is unique only within a table, while GUID is unique across all tables.