Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: MikiNanuk on September 16, 2004, 02:20:43 pm
-
Hi,
We have a class called Address that we modelled in EA. The class originally had a property called AddressId. We subsequently changed the property to just Id (after all, Address.AddressId is pretty redundant ;D ).
We removed AddressId from both the model and the C# code. Trouble is, every time we sync the projects (MDG Link), we end up with the following in Address.cs:
public long AddressId {
get{
return <unknown>;
}
set{
<unknown> = value;
}
}
The desired property Id is also present, both in code and in the model.
How can we get rid of the amazing disappearing reappearing AddressId property for good?
::MikiNanuk
-
Have a look at the "tags" tab for the ID attribute of the Adress class - you will see that it points to the old attribute name AddressID. Just fix that up and you shouldbe ok
Bruce
-
Thanks Bruce, I'll add to that though.
The fact that EA is generating AddressID still would to be say that the property method called AddressID still exists in the model. The '<unknown>' appearing in the output suggests that the tagged value says that the 'attribute_name' tagged value is empty. (Look in the code templates to see that)
Additionally, if you go into the attribute dialog box for that attribute the Property Name is likely to not be updated. If it's still saying AddressID there then the easiest way to fix that is to uncheck the property box and check it again.
I that wont delete the old property because it isn't referencing the attribute still. (If I'm correct about what I think is in your model) In that case you'll also want to delete the AddressID property method.
Simon
-
Here's what I do:
- Right click on Address in the Project View
- Select Properties
- Select the Detail tab
- Click on the Attributes... button
- There is no mention of addressId
- Repeat, but this time click on the Operations... button
- There is no mention of AddressId
Where exactly do I need to clear out "AddressId" from my model?
Thanks,
::MikiNanuk
-
Anyone know what I need to do to fix this issue?
-
When you get to the Operations form, click on the Tags tab, you should see - for any operation that is a property - a tag naming the attribute it is "connected" to.
hth
Bruce