-
Notifications
You must be signed in to change notification settings - Fork 532
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
Missing key_type feature on 0.10 #1344
Comments
key_type
feature on 0.10.0
@benebrice sorry I missed this in gitter. Could you explain the issue a bit more? You should be able to set the key type globally through the config like:
or per resource with the key_type method in the resource declaration. This is put together in https://github.com/cerebris/jsonapi-resources/blob/master/lib/jsonapi/basic_resource.rb#L765 I'm using uuid key types set in the config in several projects with version 0.10 so I believe it's working. From your gitter comment I'm wondering if you have renamed the primary_key field from |
No worries for the delay! |
@benebrice I added a branch to the peeps_uuids app, https://github.com/cerebris/peeps-uuids/tree/base_resource_test, that shows I think what you are doing. The resources are derived from a base resource:
and the config no longer sets the resource_key_type. It seems to be working. |
@benebrice are you still having this issue? |
I did not have time to check It but take a look at @lgebhardt comment above. I didn't test it yet but if it's working, I made a mistake on my configuration. 🙂 |
This issue is a (choose one):
Checklist before submitting:
Description
On
0.10
,key_type
still exists from0.9
but is not manage.Indeed,
ResourceIdentity
only handles primary key. It might work ifkey_type
is actually the primary key but it's not. Errors are raising.For example, with
id
as a primary key anduuid
askey_type
.This is a part of the job. I'm not 100% confident with all side effects that update might have. Maybe @lgebhardt can help with his knowledge.
Gitter on 11th of December 2020
The text was updated successfully, but these errors were encountered: