serializeHasMany (snapshot, json, relationship)
Defined in addon/serializers/json.js:1206
serializeHasMany can be used to customize how DS.hasMany properties are serialized. Example app/serializers/post.js
import DS from 'ember-data';
export default DS.JSONSerializer.extend({
serializeHasMany: function(snapshot, json, relationship) {
var key = relationship.key;
if (key === 'comments') {
return;
} else {
this._super.apply(this, arguments);
}
}
});
Paramet