lundi 15 août 2016

Ember Data: Submitting only properties that are not null or empty

I have defined a model with many different properties, but only a few of them are required when creating a record on my backend. Creating a new record with createRecord with only a few of the properties makes the rest of the properties to be null or "", which causes my backend to fail.

How can I make Ember create a model object with only the properties I'm passing to createRecord or, alternatively, how can I remove the null properties before they are sent to the backend?




Aucun commentaire:

Enregistrer un commentaire