@Override
  public List<OpenLRSEntity> saveAll(Collection<OpenLRSEntity> entities) {
    List<OpenLRSEntity> retval = null;

    if (entities != null && !entities.isEmpty()) {
      List<Event> events = new ArrayList<Event>();
      for (OpenLRSEntity openLRSEntity : entities) {
        events.add(eventConversionService.toEvent(openLRSEntity));
      }

      retval = (List<OpenLRSEntity>) (List<?>) mongoEventRepository.save(events);
    }

    return retval;
  }
 @Override
 public OpenLRSEntity save(OpenLRSEntity entity) {
   Event event = eventConversionService.toEvent(entity);
   return mongoEventRepository.save(event);
 }