Does anyone know of a way to specify for an Ember model
an attribute which is not persisted?
Basically, we\'re loading some metadata related to each model
Following this answer, to prevent a field from being serialized, override the default serializer for your model:
In app/serializers/person.js
:
export default DS.JSONSerializer.extend({
attrs: {
admin: { serialize: false }
}
});
See here for the source PR. This solution works in Ember Data 2, and should work in older versions as well.