docs: function (factory, options) {
                      options = options || {};
  
                      if (_.isFunction(factory)) {
                          if (factory === this.$dataSource.$collectionFactory) {
                              throw new Error("Untyped collections not allowed");
                          }
  
                          var collectionClassName = factory.prototype.constructor.name;
  
                          if (!collectionClassName) {
                              throw new Error("No collection class name defined");
                          }
  
                          _.defaults(options, {
                              factory: factory
                          });
  
                          var cachedCollection = this.getInstanceByCacheId(Context.generateCacheIdForCollection(collectionClassName));
  
                          if (!cachedCollection) {
                              // create new Collection
                              cachedCollection = new factory(null, options);
                              // set context
                              cachedCollection.$context = this;
  
                              // and add it to the cache
                              this.addCollectionToCache(cachedCollection);
                          }
  
                          return cachedCollection;
  
                      } else {
                          throw "Factory has to be a function";
                      }
                  }