Skip to content
New issue

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

[BUGFIX beta] serialize type for embedded, polymorphic belongsTo #3875

Merged
merged 1 commit into from
Nov 11, 2015
Merged

[BUGFIX beta] serialize type for embedded, polymorphic belongsTo #3875

merged 1 commit into from
Nov 11, 2015

Conversation

pangratz
Copy link
Member

This fixes the issue where the serializePolymorphicType hook on the
serializer hasn't been invoked when an embedded, polymorphic belongsTo
relationship is serialized.


This issue has been reported in #3871 (though for ember-data v1.13.8).

vicinity: get(tom, "secretLab").get("vicinity"),
infiltrated: true
}
});
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is the way this should work. Now that I think about it, this probably should be a type property inside the secretLab object instead of the secretLabType, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not sure about the correct behavior here. cc @igorT @cyril-sf

run(function() {
tom = env.store.createRecord(
'super-villain',
{ firstName: "Tom", lastName: "Dale", id: "1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we clean up the formatting here a bit? it'd be preferable for this to span multiple lines:

{
  firstName: "tom",
  lastName: "Dale",
  id: "1",
}

This fixes the issue where the `serializePolymorphicType` hook on the
serializer hasn't been invoked when an embedded, polymorphic belongsTo
relationship is serialized.
bmac added a commit that referenced this pull request Nov 11, 2015
…phic-belongsTo

[BUGFIX beta] serialize type for embedded, polymorphic belongsTo
@bmac bmac merged commit d4a5bf1 into emberjs:master Nov 11, 2015
@pangratz pangratz deleted the fix-serialize-embedded-polymorphic-belongsTo branch December 27, 2015 12:06
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.

None yet

3 participants