Book a Demo

Author Topic: Parameter GUID not persistent?  (Read 3707 times)

paphko

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Parameter GUID not persistent?
« on: July 07, 2007, 12:35:21 am »
I use the Java API to access a model via the automation interface. I use the guids of all elements to keep track of them if anything changes within the model.
But each time I re-open the model, each parameters gets a new guid! All other elements (packages, elements, attributes, etc) keep their guids.

Bug or feature? ::)

cu
Patrick

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Parameter GUID not persistent?
« Reply #1 on: July 09, 2007, 02:35:11 am »
Bug.

Please report this to Sparx directly. Use the Support link at the top of any forum page, then the Bug Report link in the left side menu. Or from the EA main menu choose Help | On-line Resources | Bug Report Page

David
No, you can't have it!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Parameter GUID not persistent?
« Reply #2 on: July 09, 2007, 02:55:35 am »
Quote
I use the Java API to access a model via the automation interface. I use the GUIDs of all elements to keep track of them if anything changes within the model.
But each time I re-open the model, each parameters gets a new GUID! All other elements (packages, elements, attributes, etc) keep their GUIDs.

Bug or feature? ::)

cu
Patrick
Check if the returned GUID is the same as that held in the DB.

In our testing, the parameter GUID in the DB did NOT change (can't speak for 7.0 - we haven't completed our testing).  We did extensive functional identity testing to determine where Sparx were generating bad XMI imports.  As part of that testing, we did matching on GUIDs and that seemed to be OK.  (Oh, nearly forgot, our testing was with Jet 4.0 .EAP files - YMMV)

If the GUID returned is the same, can you confirm it is changing in the DB?

HTH and TIA,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

paphko

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Re: Parameter GUID not persistent?
« Reply #3 on: July 09, 2007, 04:13:57 am »
The scenario is a little bit different than I explained, sorry for that.

The GUID of a parameter changes sometimes after modifying the parameter. Finally, I figured out when it does change and when it does not:

1. I open the dialog to edit a method which - in my case - contains one parameter. Next to the 'Parameters' field I use the 'Edit' button to edit the parameter. In the Parameters-Dialog I select the parameter, change the name, save it and close the dialog. Then I save the method.
=> This does not change the GUID of the parameter.

2. Again, I open the dialog to edit a method which contains one parameter. In the 'Parameters' field, the parameter is defined as 'myParameter: boolean'. This time, I use this field to change the name to 'myChangedParameter: boolean'.
=> This does change the GUID of the parameter!

Tested with version 6.1 build 791.
In version 6.5 build 804 it seems to be fixed.

Patrick