I have a Project class that has one Objective. an Objective that has many Projects. a Meeting that can be associated to a Project (which has an Objective) or Objective. How can I represent this relationship in a Class Diagram
Asked
Active
Viewed 40 times
3
-
1Well, all the `id` attributes are for the bin and all your classes are abstract. So this way it's no business domain model at all. – qwerty_so Jul 20 '23 at 11:26
-
What is your concern with "circular association"? – qwerty_so Jul 20 '23 at 13:53
1 Answers
3
There is absolutely no problem in UML with circular associations. This is common business as soon as you model real life domains. You could even have self-associating classes in a circular association, and it still wouldn't be an issue.
Your only modelling challenge is to represent accurately:
A
Meeting
that can be associated to aProject
(which has anObjective
) orObjective
.
You must therefore first disambiguate:
- can it be none of the two (your diagram gets it) ?
- can it be both? If yes:
- can the meeting's objective be different from the project objective (your diagram still gets it) ?
- or shall objectives of the meeting and the project be aligned (see my other answer here, how to express constraints between direct and indirect associated classes using OCL)
- must it be the one or the other but not both (see this question for the best recent answers on this topic)?

Christophe
- 68,716
- 7
- 72
- 138