@Transactional
@SuppressWarnings("unchecked")
public void deleteHotel(int id)
{
Hotel hotel = this.entityManager.find(Hotel.class, id);
this.entityManager.remove(hotel);
Query query = this.entityManager.createQuery("select r from Reservation r where r.hotel.id=:id");
query.setParameter("id",hotel.getId());
List<Reservation> res = query.getResultList();
for(Reservation r : res)
{