if (changesOnly.containsKey("officeId")) {
final Long officeId = (Long) changesOnly.get("officeId");
final Office newOffice = this.officeRepository.findOne(officeId);
if (newOffice == null) { throw new OfficeNotFoundException(officeId); }
staffForUpdate.changeOffice(newOffice);
}
if (!changesOnly.isEmpty()) {
this.staffRepository.saveAndFlush(staffForUpdate);
}