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

Custom primaryKey for embedded polymorphic relations work #3138

Merged
merged 1 commit into from Jun 1, 2015
Merged

Custom primaryKey for embedded polymorphic relations work #3138

merged 1 commit into from Jun 1, 2015

Conversation

pangratz
Copy link
Member

@pangratz pangratz commented Jun 1, 2015

Since the hashs of the polymorphic embedded records are normalized, the - possible - customized primaryKey can be accessed via the id property.


This addresses #2793.

cc @igorT

Since the hashs of the polymorphic embedded records are normalized, the
- possible - customized primaryKey can be accessed via the `id` property.
color: "Red"
},
{
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.

shouldn't this be custom?

Copy link
Member Author

Choose a reason for hiding this comment

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

😯 – The primaryKey is only defined for the serializer:light-saber. If both embedded records should have custom as primaryKey, it would/could be defined in serializer:secret-weapon.

Am I missing something? 😔 💭

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 could add a comment since I guess this would make reading the test easier ... c/d?

Copy link
Member

Choose a reason for hiding this comment

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

NM, I scrwed up while reading

@igorT
Copy link
Member

igorT commented Jun 1, 2015

Thanks!

@pangratz
Copy link
Member Author

pangratz commented Jun 1, 2015

@mayatskiy since you originally reported the issue in #2793, can you check the test cases in this PR and confirm that they are the ones you had/have issues with?

igorT added a commit that referenced this pull request Jun 1, 2015
Custom primaryKey for embedded polymorphic relations work
@igorT igorT merged commit 92704a0 into emberjs:master Jun 1, 2015
@igorT
Copy link
Member

igorT commented Jun 1, 2015

Thanks!

@pangratz
Copy link
Member Author

pangratz commented Jun 1, 2015

👯

@mayatskiy
Copy link

@pangratz yes, I can.

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