-
-
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
Embedded polymorphic record with custom id doesn't work. #2793
Comments
Hey @mayatskiy, i'm using polymorphic embedded records successfully. Can you please reproduce the issue on http://emberjs.jsbin.com/ ? |
@lolmaus with custom id? |
@mayatskiy, my polymorphic records are treated by the backend as nested attributes rather than child records. They arrive without ids. I override the |
Thanks for the bug report @mayatskiy. Would you like to open a pr to fix this issue? |
@pangratz wanna take a stab at this? Shouldn't be too hard, we in fact don't need to worry about the primary key here because we already normalized, so if you just remove those couple lines + a test would be good to go |
@igorT I will take a stab at it tomorrow |
Fixed by #3138 |
If I have embedded polymorphic records and a custom primaryKey (for example '_id').
When I use EmbeddedRecordsMixin this code works incorrectly:
next line:
sets undefined id. Because embeddedRecord has no '_id' key after deserialization and have only 'id' key.
The text was updated successfully, but these errors were encountered: