rest - Saving each hasMany relation to a different API end-point -


In my Amber application, I have models for both the user and the organization, which are with DS.hasMany relation. I am using a comfortable adapter and everything works fine, except that the API I am using will not allow me to save any user. It has a different end point in the organization's model: < / P>

  Organization = DS.Model.extend User: DS.hasMany ('user', {Async: true, inverse: null}) No DS.attr ('string')  

End point of organization:

  / organization / { Organization_id}  

... which gives the organization an array of collaborative user_id

But for an organization to add a user, One must do the following:

  / organization / {organization_id} / user  

Can someone point me right? Thanks


Comments