project.getEvents().remove(event);
em.merge(project);
}
//Updating organizer.
User organizer = event.getOrganizer();
if (organizer != null) {
organizer.getEventsOrganized().remove(event);
em.merge(organizer);
}
//Updating guests.
List<User> guests = event.getGuests();