// We need to reset ids as openJPA reject to store them otherwise
r.setRooms_id(null);
if (r.getModerators() != null) {
for (Iterator<RoomModerator> i = r.getModerators().iterator(); i.hasNext();) {
RoomModerator rm = i.next();
if (rm.getUser().getUser_id() == null) {
i.remove();
}
}
}
r = roomDao.update(r, null);