Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: mse on May 09, 2021, 12:53:46 am
-
On the following help page they describe how to create a structured tagged value. I can follow the example, and it works fine. However, let's suppose you have a Person class that has a third address, maybe a fourth one, and yet another has no address. Is there a away to somehow do this in the profile?
Source: https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/add_structured_tagged_value_cl.html (https://sparxsystems.com/enterprise_architect_user_guide/14.0/modeling_tools/add_structured_tagged_value_cl.html)
-
No. Stereotype properties are fixed. In such a case I would model the address as a separate object and have them associated. Stereotype properties are no object substitutes.
q.
-
Working with models you should think more object oriented. Multiple addresses are not attributes of person but "related" with it. As a different address has its own identity (object) in your model, it is easy to associate the address with the person via a relation of your choice. That's the power of models - they are graphs! Think about two persons having the same address - in your model you just link the other person and avoid redundancy of information.
-
Excellent answers, thank you Daiim and qwerty, because this helped me arrive at the root of the things and understanding a problem that has bothered me for quite some time. I especially liked the statement
That's the power of models - they are graphs!
Thinking in terms of associations and object orientation as both of you suggested may make it possible to avoid the use of stereotypes or custom tags, and that is something I prefer, thanks! :)