-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Conversation
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", |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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? 😔 💭
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
Thanks! |
@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? |
Custom primaryKey for embedded polymorphic relations work
Thanks! |
👯 |
@pangratz yes, I can. |
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