Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
A syntax error when setting an attribute as a key, and this attribute is defined in a parent class #1026
1- Define an attribute, id for example, in a parent class.
The reason is that in the code generated, we access the field directly, which is private at the children levels. In order to overcome this issue, we should use the getter methods instead.
The issue is in this file: equals.ump
The java produced is trying to access the variable instead of using a get method for inherited private variables. I have replaced the code generation to only use get() methods, but I believe that the issue has to do with how Keys are instantiated.
The umple code is looking to see if the Attribute is derived, and if it is, it should use the get function (but it doesn't). That leads me to believe that the isDerived setting for the Key Attribute is not set for inherited Attributes.
I am going to continue to look into this as I believe it would be better to add that to the Key when it is generated rather than force a function call on all keys (regardless if the key's variable is inherited or not)