I have a model with many attributes and certain associations. Most of them may or may not be null. I am trying to do an Ajax call with this model as a payload, and certain properties can be null.
I want to send only the properties that have values, and not null, including associations.
Is it possible? Kindly let me know if it is possible.
export default DS.Model.extend({
name : DS.attr('string'),
address : DS.hasMany('address')
});
Aucun commentaire:
Enregistrer un commentaire