constructor(modelName, models = []) {
    assert(
      modelName && typeof modelName === "string",
      "You must pass a `modelName` into a Collection"
    );

    /**
      The dasherized model name this Collection represents.

      ```js
      let posts = user.blogPosts;

      posts.modelName; // "blog-post"
      ```

      The model name is separate from the actual models, since Collections can be empty.

      @property modelName
      @type {String}
      @public
    */
    this.modelName = modelName;

    /**
      The underlying plain JavaScript array of Models in this Collection.

      ```js
      posts.models // [ post:1, post:2, ... ]
      ```

      While Collections have many array-ish methods like `filter` and `sort`, it
      can be useful to work with the plain array if you want to work with methods
      like `map`, or use the `[]` accessor.

      For example, in testing you might want to assert against a model from the
      collection:

      ```js
      let newPost = user.posts.models[0].title;

      assert.equal(newPost, "My first post");
      ```

      @property models
      @type {Array}
      @public
    */
    this.models = models;
  }
Collections represent arrays of models. They are returned by a hasMany association, or by one of the ModelClass query methods:

  ```js
  let posts = user.blogPosts;
  let posts = schema.blogPosts.all();
  let posts = schema.blogPosts.find([1, 2, 4]);
  let posts = schema.blogPosts.where({ published: true });
  ```

  Note that there is also a `PolymorphicCollection` class that is identical to `Collection`, except it can contain a heterogeneous array of models. Thus, it has no `modelName` property. This lets serializers and other parts of the system interact with it differently.

  @class Collection
  @constructor
  @public