Skip to content
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

"id" field type on relational vs mongo #30

Open
jkerys-halo opened this issue May 12, 2021 · 1 comment
Open

"id" field type on relational vs mongo #30

jkerys-halo opened this issue May 12, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@jkerys-halo
Copy link

By default "id" field is generated as string type, which matches Mongo id type (mostly, as there's more issues with type of mongo id). However Mongo is planned to be dropped in version 4, and as I just found out, "id" field type on Postgres (and pretty surely all relational) is number. Which causes issues, I got around them by adding this to config

    type: (fieldType, fieldName, interfaceName) => { if(fieldName == 'id') return 'number' }, 

But I think it would be nicer if this is default behavior, and/or have a separate option for controlling type of "id" field.

@aperron
Copy link
Collaborator

aperron commented May 17, 2021

Thanks for your feedback.

Due to possible regressions I cannot make this modification on a minor version.
I keep it for the next major version

@aperron aperron added this to the v3.0 milestone May 17, 2021
@aperron aperron added the enhancement New feature or request label May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants