docs: function (store, type, record, addId) {
      var json;
      type = this._parseModelOrType(store, type);
      json = record.serialize({includeId: true});
      if (!json.id && addId) {
        json.id = this.generateId(store, type);
      }
      type.eachRelationship(function (key, meta) {
        var records;
        if (!meta.async && meta.kind === 'hasMany' && (records = record.get(key)) && !json[key]) {
          json[key] = records.mapBy('id').filter(Boolean);
        }
      });
      return json;
    }