I have a reservation system that manages equipment and need to check for schedule conflicts. I have set it up using relationships as discussed in this post Detecting scheduling conflicts but I have found it doesn't work in some cases where I need to allow a certain number of conflicts.
For example, if I have 3 cameras that can be reserved I will allow up to 3 conflicting reservations containing at a time. The problem comes with overlapping reservations that conflict with some reservations, but not all. Take the example below
Reservation A: Monday - Friday
Reservation B: Monday - Tuesday
Reservation C: Wednesday - Thursday
From the context of Reservation B or C there is only 1 conflicting reservation, but from the context of Reservation A there are 2.
How would I solve this issue? Is there a better way to mange conflicts in my situation?