Book a Demo

Author Topic: RAS model update: duplicate key GUID error  (Read 5698 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
RAS model update: duplicate key GUID error
« on: February 11, 2016, 09:48:13 pm »
I'm getting the following error when importing a new version of a centralised model from a RAS server:



I ran a comparison after the import and this attribute doesn't show up (nor it class). This seems to be a bug.
Note that my EA project is running on a Postgres DB.

From this comparison, I also noticed the following bugs following an import:
- diagrams Date created and Date modified are not correctly updated -> the imported diagram's time is set to 00:00:00 hence leading to a difference with the RAS.
- generalization links' Style field have an extra Hidden=0 value in the Baseline



Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: RAS model update: duplicate key GUID error
« Reply #1 on: February 11, 2016, 09:58:43 pm »
The _attribute_ is misleading. You have to find the guid in all possible tables. Have a look in DBError.txt (in %appdata%). Maybe this gives a hint.

q.

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: RAS model update: duplicate key GUID error
« Reply #2 on: February 11, 2016, 10:07:58 pm »
thanks for the advice.
Here is the SQL query that I found in DBError.txt: select * from t_attribute where ID=0

This seems to be a RAS bug.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: RAS model update: duplicate key GUID error
« Reply #3 on: February 11, 2016, 11:14:16 pm »
Hmm. A select can not cause a duplicate key constraint violation. You should contact Sparx support.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: RAS model update: duplicate key GUID error
« Reply #4 on: February 12, 2016, 08:45:49 am »
select * from t_attribute where ID=0 just means EA requested an empty result set for inserting into. DBError.txt reports the base query, not that actions that are taken on that query.

The duplicate key error is almost certainly that the attribute already exists somewhere in the model. It was probably moved to a different class since the model was exported to RAS. Unfortunately, it's not practical to check every guid in the XMI being imported to see if it already exists in the model. From memory EA has always just checked the top level package. This error will only occur within a single table (in this case t_attribute.) Duplicate attributes across tables is detected by EA's data integrity check.

Time will be lost because some DBMS only have a date fields in t_diagram. We have updated schemas to make them consistent, but I can't remember if they've been released.

I haven't seen the added Hidden=0 in the baseline comparison, but it looks like the default value is being stripped during import or something like that.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: RAS model update: duplicate key GUID error
« Reply #5 on: February 12, 2016, 09:06:17 pm »
If you use the EA navigator you can find the attribute (or other item) based on its GUID.

Geert