code: public boolean hasChanges() {
          for (Map.Entry<Object, DocumentInfo> entity : documentsByEntity.entrySet()) {
              ObjectNode document = entityToJson.convertEntityToJson(entity.getKey(), entity.getValue());
              if (entityChanged(document, entity.getValue(), null)) {
                  return true;
              }
          }
  
          return !deletedEntities.isEmpty();
      }
docs: Gets a value indicating whether any of the entities tracked by the session has changes.
  
  @return true if session has changes