frank06 / ember-data-save-relationships

A mixin for Ember Data JSON API serializers to save relationship data
https://github.com/laborvoices/ember-data-save-relationships
MIT License
41 stars 20 forks source link

Reason for disabling embedded relationships #4

Open v-ken opened 8 years ago

v-ken commented 8 years ago

Hi Frank,

Was wondering if there was a reason for disabling embedded relationships?

https://github.com/frank06/ember-data-save-relationships/blob/master/addon/index.js#L42,L43

// do not allow embedded relationships
delete serialized.data.relationships;

Some of my relationships needs that data in order to be saved on the server side. I tried to remove that line and the add-on seems to be working fine. Was wondering if I could safely do this?

frank06 commented 8 years ago

Reason: I was lazy to add the test. Does it actually work? Do you think you could contribute a test? If not at some point I'll try myself

v-ken commented 8 years ago

Thanks Frank. Will try to add a test for it.

BryanCrotaz commented 8 years ago

We've got a PR for this - testing on our code base then we will submit. Adds tests and fixes code.

v-ken commented 8 years ago

@BryanCrotaz Thanks! Sorry I didn't have the chance to get around to this.

BryanCrotaz commented 8 years ago

PR #8