Home » Modeling » EMF » model attributes for each pair of class A and class B
model attributes for each pair of class A and class B [message #641742] |
Sat, 27 November 2010 14:16 |
Carsten Schr Messages: 2 Registered: November 2010 |
Junior Member |
|
|
Hi all,
I am not at all experienced with model driven development, so I hope I can make myself understood.
I have constructed a model which defines two classes A and B. In addition it defines a class that holds a reference to exactly one A and exactly one B with the purpose to set a number of attributes for these pairs.
The problem is that these attributes MUST be defined for EACH pair of object of class A or B, respectively. For example, if I have two objects a1,a2 of class A and three objects b1,b2,b3 of class B, I need six pair objects (a1,b1),(a1,b2),(a1,b3),(a2,b1),(a2,b1),(a2,b3).
Can I force by model design that all these six pairs must exist for the validation of a model?
Thank you
Carsten
|
|
|
Re: model attributes for each pair of class A and class B [message #641756 is a reply to message #641742] |
Sat, 27 November 2010 16:59 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Carsten,
Comments below.
Carsten Schr wrote:
> Hi all,
> I am not at all experienced with model driven development, so I hope I
> can make myself understood.
>
> I have constructed a model which defines two classes A and B. In
> addition it defines a class that holds a reference to exactly one A
> and exactly one B with the purpose to set a number of attributes for
> these pairs.
>
> The problem is that these attributes MUST be defined for EACH pair of
> object of class A or B, respectively. For example, if I have two
> objects a1,a2 of class A and three objects b1,b2,b3 of class B, I need
> six pair objects (a1,b1),(a1,b2),(a1,b3),(a2,b1),(a2,b1),(a2,b3).
>
> Can I force by model design that all these six pairs must exist for
> the validation of a model?
Not really. if you defined some type of container that held the A and B
as well as the links/pairs you could define a name constraint on that
and implement it to check that all the combinations appear.
>
> Thank you
> Carsten
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Goto Forum:
Current Time: Fri Apr 19 23:11:01 GMT 2024
Powered by FUDForum. Page generated in 0.13266 seconds
|