-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add resourceConfig.generateId to disable automatic ID generation. #320
Conversation
I'm open to merging this, since there are a number of arguments for it. However, I will need some test coverage to go with the code changes. |
Of course! I made this change a long time ago and had completely forgotten that it was missing tests. I'll add them in the next couple of days and update the PR. |
1cd914f
to
fefe957
Compare
Added tests & documentation. |
@wolfgang42 |
@championswimmer I considered overriding the data type, but the JSON-API spec says:
In the interests of maintaining a properly conformant API I therefore cast them to strings when they come out of the database and the rest of the code treats them as such; when I put them back in the server handles the casting automatically. Since they're IDs everything else just treats them as opaque anyway. |
@wolfgang42 is correct. I should have time this week to merge this work. |
@paparomeo @pmcnr-hx @wolfgang42 I have added support for generateId flag in relationaldb too |
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.
👍 Looks great. Thanks again for the contribution. Merging!
Closes #259.