-
Notifications
You must be signed in to change notification settings - Fork 299
Respect serializer's id
field.
#576
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
Respect serializer's id
field.
#576
Conversation
This PR seems to be related to issue #155
For complete support to overwrite primary key of a resource it also needs to be possible to reference such in relationships. How would you go about this with your approach?
Other question is also how the view would need to look like for custom primary key lookup?
Datamance
commented
Apr 11, 2019
What is the recommended workaround for this, for the time being?
Glad this is being worked on!
38c2ab0
to
7e3c2da
Compare
Codecov Report
@@ Coverage Diff @@ ## master #576 +/- ## ========================================== - Coverage 96.11% 95.64% -0.48% ========================================== Files 56 55 -1 Lines 2859 2870 +11 ========================================== - Hits 2748 2745 -3 - Misses 111 125 +14
Continue to review full report at Codecov.
|
Closing this PR as there hasn't been any progress and I don't quite see how this approach will work with relationships.
Please feel free to comment also in #155 for any suggestions how to move forward.
Uh oh!
There was an error while loading. Please reload this page.
Description of the Change
Until now the renderer ignored
id
field provided by the serializer. This prevented API author from using separate values for internal database key (pk
) and for user facing resource ID. One reason for using separate values like this is if the pk has to be small for use by foreign keys and external id can be longer, for example a human readable string.Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS