Compare one attribute to multiple others

Hi all, is there an easy way to check if one attribute of one object is part of attributes of multiple other objects? Lets say I have the following domain model: One teacher can have multiple qualifications. One Event needs one teacher and is assigned to one needed quali. How can I check via microflow or Xpath, if the needed qualification of a certain event (ONE) is part of the qualification (MULTIPLE) of a certain teacher (ONE)? The ONE Object -> MULTIPLE Objects association is an issue here, bc I am not able to easily filter by Xpath in that case. I could use a loop but maybe there is a more convenient way to solve this? Thanks!
1 answers

Your domain model is wrong. A Teacher can have multiple qualifications and each qualification could be attached to multiple teachers. So imho this is a multiple – multiple relation. Same for Teacher and Event because the teacher can go to multiple events and I think that one event can have multiple teacher attending that event. If you set it up like this you can retrieve from the event the qualification and retrieve the teachers going to that event. You could also from the teacher retrieve its qualifications and then retrieve the upcoming events for that qualification.




I would solve it with an XPATH when you retrieve the events. Something like:
[Event_Qualification/Qualification/Teacher_Qualification/Teacher = [%CurrentUser%]]