How to send model Id on save


#1

I’m creating a new Language model and set its id (as ISO code). I’d like to send this Id on save. How should I do it?

import DS from 'ember-data';

export default DS.Model.extend({
  name: DS.attr('string')
});

I set id for new record (e.g. ‘id’ = ‘spa’, ‘name’ = ‘Spanish’) however on save() id is not sent. That what I see in POST request

{"data":{"attributes":{"name":"Spanish"},"type":"languages"}}