Here I report a very dangerous bug
Starting from a clean db
1. Create a first booking, for example: from 1/3/2013 to 15/3/2013 and select a room X
2. Create a second booking, for example: from 16/3/2013 to 30/3/2016, and select the same room X
This is a real scenario, where two different customers book the same room, in different periods.
Then edit first booking and change end date to 20/3/2013 (don't change room). Submit.
The booking form report the error: "Room Availability could not be updated"
1. First booking registers the wrong "end date", overlapping the second booking. Moreover the event "after updating an existing booking" is yet fired.
2. Looking at room availiability, sometimes is correctly not updated, sometimes availability of first booking is lost
So this leads the DB in an inconsistent dangerous state.