adding sequence to associated list

0
Hi, I’m building a shift manager. Therefore I have 2 main entities, “Shift” and “Agents”. A shift can have multiple agents assigned. What I’m trying to achieve is when I create a shift and assign agents to it, I want to be able to define who’s the first agent on the shift, who’s the second agent on shift and so on… This is my domain model so far. I was wondering who I can set the order. Do I need another entity handling the ordering? EG. like this? Thank you for helping me out here. With Best Regards, Sascha
asked
1 answers
0

Hi Sascha,

You could break the many to many relation by adding an intermediate entity to help you sort the shifts assigned to agents (1-* , *-1) , then you give the agent an assignment which relates to a shift. Assignment has a number to help you determine the order you need.

 

Regards,

Sufian.

answered