Saving a hasMany relationship containing array of IDs back to REST server
using Ember-Data
I am using Ember-Data 1.0 Beta 2.
I have a model that contains an attribute containing a list of IDs as an
array. It's defined as a hasMany relationship, see below:
Lrt.User = DS.Model.extend({
jobRole: hasMany('jobRole', {async:true, embedded:'always'}),
});
When I do a model.save(), the POST payload shows that "jobRole" is empty,
as in [].
How do I save the hasMany relationship back using Ember-Data?
No comments:
Post a Comment