Respect Your Data

Give your data the treatment it deserves with a framework-agnostic, datastore-agnostic JavaScript ORM built for ease of use and peace of mind. Works in Node.js and in the Browser.

Get Started


DS#createCollection(resourceName[, array][, params][, options])

Create a new collection of the specified Resource. Collection are somewhat like Backbone.Collection. They have a .fetch([options]) method which will call DS#findAll with the params you provided, and splice the result into the collection.

You can create Collections that use cacheResponse: false, so their contents are never injected into the store, otherwise Collections end up being a subset of the data in the store.


You can call DS#createCollection multiple ways

  • DS#createCollection(resourceName[, array][, params][, options])
  • Resource#createCollection([array][, params][, options]) - Where Resource was created by DS#defineResource






The name of the resource to use. Unnecessary if calling createCollection directly on a Resource.

array (optional)


Default [ ].

params (optional)


Query parameters. Default: {}. See Query Syntax.

options (optional)


Settings are inherited from Resource and Global defaults. Will be passed through to DS#findAll, the adapter's findAll method and DS#inject, if they are called.



Need help!

Want more examples or have a question? Ask on the Slack channel or post on the mailing list then we'll get your question answered and probably update this wiki.

Updated less than a minute ago


DS#createCollection(resourceName[, array][, params][, options])

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.