We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is my models,
APP.User = DS.Model.extend({ name: DS.attr('string'), itemLock: DS.belongsTo('item-lock') });
APP.ItemLock = DS.Model.extend({ item: DS.belongsTo('item', {polymorphic: true}), UserId: DS.belongsTo('user') });
Here is the serializers,
APP.UserSerializer = DS.RESTSerializer.extend({ attrs: { itemLock: {embedded: 'always'} } });
APP.ItemLockSerializer = DS.RESTSerializer.extend({ serializePolymorphicType: function(snapshot, json, relationship) { console.log('snapshot:-', snapshot); } });
Here is sample response
{ user: { id: 1, name: 'John', itemLock: { id: 1, item: 2, itemType: 'assignment' } } }
I am using Ember-data V1.13.8. I am not able to override serializePolymorphicType. Any thoughts on this?
The text was updated successfully, but these errors were encountered:
I think this issue can be closed since #3875 and #3876 have been merged...
Sorry, something went wrong.
No branches or pull requests
Here is my models,
Here is the serializers,
Here is sample response
I am using Ember-data V1.13.8. I am not able to override serializePolymorphicType. Any thoughts on this?
The text was updated successfully, but these errors were encountered: