Skip to content

Conversation

osmanorhan
Copy link

This control added because when I try to add an additional model serializer with embed options, it assumes there is a hasMany relation but function (snapshot.hasMany) returns undefined.
Example:

X Model:
     name: DS.attr(),
     attr: DS.hasMany('attr'),

Y Model:
   code: DS.attr(),
   xs: DS.belongsTo('X')

Y Serializer:
import ApplicationSerializer from './application';
import DS from 'ember-data';
export default ApplicationSerializer.extend(DS.EmbeddedRecordsMixin, {
     attrs: {
        xs: { embedded: 'always' },
    },
});

In example, I want to use embedded "xs" when I save model but it gets error due to X.attr.

@codecov-io
Copy link

codecov-io commented Sep 30, 2016

Current coverage is 75.00% (diff: 0.00%)

No coverage report found for master at f6826c5.

Powered by Codecov. Last update f6826c5...d0af8b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants