To understand DDD better, I am trying to create the Domain Layer of an online class application. I have a concept of a Student, Tutor and Session.
I thought of having one aggregate called Session and they can contain the entities of Student and Tutor.
But I ran into problems with this:
The
StudentandTutorconcepts may have many other related Domain Objects that has nothing to do with the concept of aSession.The client may decide to have courses in which Tutors and Students are assigned, in that case I would need to have the duplicate entities in the
Courseaggregate.
If I do keep them as separate aggregates, there is a relationship between entities across aggregates, which should not happen.
How can I design this part of the Domain Layer?