Hi Charles, i just came out with the ejbql for the method you mentioned earlier. However, i would like to ask if the N.Recurrence is Monthly and say the date is 25th of the month, could there be a possibility that the 25th is a Monday and it happens to clash with a Weekly booking that is on a Monday also?
Currently, my understand of your method is that if N.recurrence is either a weekly or monthly i will only check for R.recurrence with weekly or monthly. Is that right?
My current flow of checking:
1) Check whether the existing bookings(R) is within the new booking(N), which includes the start date, end date, start time and end time.
2) Next, from the result set of (1), i check through the frequency with Daily.
3) If there happen to be no clash in (2), from the result set of (1), i check though frequency with Weekly or Fortnightly.
4) Again, if there happen to be no clash in(3), from the result set of (1), i check though frequency with Monthly.
According to my flow, i will go through all the conditions regardless of whether N frequency is Daily, Weekly, Fortnightly or Monthly. Did i miss out something? Please correct me if i am wrong.
Thanks~