private/adapters/dev-fixtures.js
function (store, record, Model, json, handledRecords) {
    if (handledRecords.indexOf(record) === -1) {
      handledRecords.push(record);
      Model.eachRelationship(function (name, meta) {
        var related, fixtures, relatedTypeKey, ids;
        if (!meta.async && record[name]) {
          fixtures = Ember.A(this.fixturesForType(store, meta.type));
          ids = coerceId(record[name]);
          if (meta.kind === 'hasMany') {
            if (ids && ids.length) {
              related = fixtures.filter(function (r) {
                return ids.indexOf(coerceId(r.id)) !== -1;
              });
            }
          }
          else if (meta.kind === 'belongsTo') {
            related = fixtures.find(function (r) {
              return coerceId(r.id) === ids;
            });
            if (related) {
              related = [related];
            }
          }
          if (related) {
            relatedTypeKey = pluralize(meta.type.typeKey);
            if (!json[relatedTypeKey]) {
              json[relatedTypeKey] = [];
            }
            related.forEach(function (record) {
              if (json[relatedTypeKey].indexOf(record) === -1) {
                json[relatedTypeKey].push(record);
              }
              this.completeJsonForRecord(store, record, meta.type, json, handledRecords);
            }, this);
          }
        }
      }, this);
    }
  }
function (store, record, Model, json, handledRecords) {
    if (handledRecords.indexOf(record) === -1) {
      handledRecords.push(record);
      Model.eachRelationship(function (name, meta) {
        var related, fixtures, relatedTypeKey, ids;
        if (!meta.async && record[name]) {
          fixtures = Ember.A(this.fixturesForType(store, meta.type));
          ids = coerceId(record[name]);
          if (meta.kind === 'hasMany') {
            if (ids && ids.length) {
              related = fixtures.filter(function (r) {
                return ids.indexOf(coerceId(r.id)) !== -1;
              });
            }
          }
          else if (meta.kind === 'belongsTo') {
            related = fixtures.find(function (r) {
              return coerceId(r.id) === ids;
            });
            if (related) {
              related = [related];
            }
          }
          if (related) {
            relatedTypeKey = pluralize(meta.type.typeKey);
            if (!json[relatedTypeKey]) {
              json[relatedTypeKey] = [];
            }
            related.forEach(function (record) {
              if (json[relatedTypeKey].indexOf(record) === -1) {
                json[relatedTypeKey].push(record);
              }
              this.completeJsonForRecord(store, record, meta.type, json, handledRecords);
            }, this);
          }
        }
      }, this);
    }
  }
function ( store , record , Model , json , handledRecords ) { if ( handledRecords . indexOf ( record ) === - 1 ) { handledRecords . push ( record ) ; Model . eachRelationship ( function ( name , meta ) { var related , fixtures , relatedTypeKey , ids ; if ( ! meta . async && record [ name ] ) { fixtures = Ember . A ( this . fixturesForType ( store , meta . type ) ) ; ids = coerceId ( record [ name ] ) ; if ( meta . kind === 'hasMany' ) { if ( ids && ids . length ) { related = fixtures . filter ( function ( r ) { return ids . indexOf ( coerceId ( r . id ) ) !== - 1 ; } ) ; } } else if ( meta . kind === 'belongsTo' ) { related = fixtures . find ( function ( r ) { return coerceId ( r . id ) === ids ; } ) ; if ( related ) { related = [ related ] ; } } if ( related ) { relatedTypeKey = pluralize ( meta . type . typeKey ) ; if ( ! json [ relatedTypeKey ] ) { json [ relatedTypeKey ] = [ ] ; } related . forEach ( function ( record ) { if ( json [ relatedTypeKey ] . indexOf ( record ) === - 1 ) { json [ relatedTypeKey ] . push ( record ) ; } this . completeJsonForRecord ( store , record , meta . type , json , handledRecords ) ; } , this ) ; } } } , this ) ; } }
Complete a record adding in the given json the related records which are not defined as async

@method completeJsonForRecord
@param {DS.Store} store
@param {DS.Model} record
@param {subclass of DS.Model} Model
@param {Object} json
@param {Array.<DS.Model>} handledRecords
Complete a record adding in the given json the related records which are not defined as async