docs: function (childFactory, requestor) {
                  var context;
                  if (childFactory) {
  
                      var configuration,
                          requestorConfiguration,
                          baseConfiguration = this,
                          isModel = childFactory.classof(Model);
  
                      context = this.root();
  
                      if (requestor) {
                          var requestorContext = requestor.$context,
                              contextStack = [];
                          // find correct configuration of requestor
                          while (requestorContext.$contextModel) {
                              contextStack.push(requestorContext);
                              requestorContext = requestorContext.$contextModel.$context;
                          }
                          var rootConfiguration = this,
                              rootContext;
                          while (contextStack.length > 0 && rootConfiguration) {
                              rootContext = contextStack.pop();
                              rootConfiguration = rootConfiguration.getConfigurationForModelClass(rootContext.$contextModel.factory);
                          }
                          var factory = requestor.factory;
                          if (factory.classof(Model)) {
                              requestorConfiguration = rootConfiguration.getConfigurationForModelClass(factory);
                          } else if (factory.classof(Collection)) {
                              requestorConfiguration = rootConfiguration.getConfigurationForCollectionClassName(factory.prototype.$modelFactory);
                          }
                          // starting from the requestors configuration, find correct context of the childFactory
                          if (requestorConfiguration) {
                              context = this.getContextByProperties(requestor, null, requestor.$context);
                              baseConfiguration = requestorConfiguration;
                          }
                          while (baseConfiguration.$parent && context) {
                              if (isModel) {
                                  configuration = baseConfiguration.getConfigurationForModelClass(childFactory);
                              } else {
                                  configuration = baseConfiguration.getConfigurationForModelClass(childFactory.prototype.$modelFactory);
                              }
                              if (configuration) {
                                  // found context
                                  break;
                              } else {
                                  context = context.$contextModel ? context.$contextModel.$context : null;
                                  baseConfiguration = baseConfiguration.$parent;
                              }
                          }
                      }
                  }
                  return context || this.root();
              }