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

Change case of AscentType enum keys and values to all lowercase. #176

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

salamca
Copy link
Contributor

@salamca salamca commented Sep 13, 2024

when using nests registerEnumType codegen generates an enum type that can be used in fe as well.

but codegen only considers enum keys of the source, which in generated.ts become values. if we want matching values (db has all lowercase) we need to use lowercase keys when defining an enum in an entity.
not too nice, since it violates naming convention for enums in typescript, but don't sea a better option to make this work.

test also with plezanje-net/next-web#49

@demshy demshy merged commit 93305b2 into master Sep 15, 2024
1 check passed
@demshy demshy deleted the fix-enums branch September 15, 2024 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants