code: function fetchType(sMetaPath) {
  			aPromises.push(that.oRequestor.fetchTypeForPath(sMetaPath).then(function (oType) {
  				var oMessageAnnotation = that.oRequestor.getModelInterface()
  						.fetchMetadata(sMetaPath + "/" + sMessagesAnnotation).getResult();
  
  				if (oMessageAnnotation) {
  					oType = Object.create(oType);
  					oType[sMessagesAnnotation] = oMessageAnnotation;
  				}
  
  				mTypeForMetaPath[sMetaPath] = oType;
  				if (oType && oType.$Key) {
  					oType.$Key.forEach(function (vKey) {
  						var iIndexOfSlash, sKeyPath;
  
  						if (typeof vKey !== "string") {
  							sKeyPath = vKey[Object.keys(vKey)[0]];
  							iIndexOfSlash = sKeyPath.lastIndexOf("/");
  							if (iIndexOfSlash >= 0) {
  								// drop the property name and fetch the type containing it
  								fetchType(sMetaPath + "/" + sKeyPath.slice(0, iIndexOfSlash));
  							}
  						}
  					});
  				}
  			}));
  		}
docs: /*
  Adds a promise to aPromises to fetch the type for the given path, put it into
  mTypeForMetaPath and recursively add the key properties' types if they are complex.
  @param {string} sMetaPath The meta path of the resource + navigation or key path (which
  may lead to an entity or complex type or to <code>undefined</code>)