Let's assume we have two classes: Patient
and MedicalExamination
. We want to get all examinations for a specific patient. Which one is better:
patient.getExaminations();
examination.get(patient);
Basically, an examination cannot exist without a patient. Therefore Patient would be the root entity of the aggregate Patient - MedicalExamination, and as such Patient (or PatientRepository) would be the way to retrieve patient details and examinations:
patient.getExaminations();