[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Using OCL to map an association
|
Hi,
I would like to know what is the best way to map my associations.
I have five Class on my metamodel that extends to my Entity Class, each
one can be associated to the other (but not with itself), to simplify my
metamodel I created a Class Association that have source and target typed
with my Entity Class. So in the diagram my source and target can be anyone
of my five Class.
The problem is that I need to set a diferent label for each kind of
Association.
For exemple:
A <-> B with Label = 'in'
B <-> C with Label = 'out'
A <-> C with Label = 'main'
So I created more five associations that extends to my Association Class.
Each one with it default label.
But when I'm on the mapping step I don't know how to differ one
association to the other.
I think I can use OCL but I don't even know how to ...
One solution that someone did before me, is to create two association for
each relation like this
association 1.1 : source(A) target(B) label = 'in'
association 1.2 : source(B) target(A) label = 'in'
But I think it's not a good solution
If someone have an ideia I would be glad.
Thanks