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

Lowercase column names before applying TitleCase #1357

Closed
wants to merge 1 commit into from

Conversation

esdrasbeleza
Copy link

I have a database which I cannot change and all the fields are in SCREAMING_SNAKE_CASE.

When I generate my models, USER_ID becomes USER_ID in my Go structs, which is not what I want and doesn't follow the expected Go conventions: I expect my field to be generated as UserID.

This small change will make my model be properly generated.

@esdrasbeleza esdrasbeleza changed the title Lowercase string if it's all in uppercase Lowercase column names before applying TitleCase Feb 16, 2024
@stephenafamo
Copy link
Collaborator

This would be a breaking change for many users, so I will close this.

For your case, I suggest renaming them using aliases.

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.

None yet

2 participants