code: function onSuccess() {
              /**
               * Make sure to clear the cache for this Entity Kind
               */
              if (_this.constructor.__hasCache(options)) {
                  return _this.constructor.clearCache()
                      .then(() => _this)
                      .catch((err) => {
                          let msg = 'Error while clearing the cache after saving the entity.';
                          msg += 'The entity has been saved successfully though. ';
                          msg += 'Both the cache error and the entity saved have been attached.';
                          const cacheError = new Error(msg);
                          cacheError.__entity = _this;
                          cacheError.__cacheError = err;
                          throw cacheError;
                      });
              }
  
              return _this;
          }
docs: --------------------------