js/libs/ember-data.js
function(type, id) {
    if (id === undefined) {
      return this.findAll(type);
    }

    // We are passed a query instead of an id.
    if (Ember.typeOf(id) === 'object') {
      return this.findQuery(type, id);
    }

    return this.findById(type, coerceId(id));
  }
function(type, id) {
    if (id === undefined) {
      return this.findAll(type);
    }

    // We are passed a query instead of an id.
    if (Ember.typeOf(id) === 'object') {
      return this.findQuery(type, id);
    }

    return this.findById(type, coerceId(id));
  }
................ . FIND RECORDS . ................ 
This is the main entry point into finding records. The first parameter to
this method is the model's name as a string.

---

To find a record by ID, pass the `id` as the second parameter:

```javascript
store.find('person', 1);
```

The `find` method will always return a **promise** that will be resolved
with the record. If the record was already in the store, the promise will
be resolved immediately. Otherwise, the store will ask the adapter's `find`
method to find the necessary data.

The `find` method will always resolve its promise with the same object for
a given type and `id`.

---

To find all records for a type, call `find` with no additional parameters:

```javascript
store.find('person');
```

This will ask the adapter's `findAll` method to find the records for the
given type, and return a promise that will be resolved once the server
returns the values.

---

To find a record by a query, call `find` with a hash as the second
parameter:

```javascript
store.find(App.Person, { page: 1 });
```

This will ask the adapter's `findQuery` method to find the records for
the query, and return a promise that will be resolved once the server
responds.

@method find
@param {String or subclass of DS.Model} type
@param {Object|String|Integer|null} id
@return {Promise} promise