Skip to content

table renaming is undocumented and confusing #593

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

Closed
tv42 opened this issue Jul 15, 2020 · 0 comments · Fixed by #2774
Closed

table renaming is undocumented and confusing #593

tv42 opened this issue Jul 15, 2020 · 0 comments · Fixed by #2774
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@tv42
Copy link

tv42 commented Jul 15, 2020

I have an M:N relation table named users_widgets. It gets named UsersWidget by the logic to make it singular; that's not great.

I couldn't find any documentation that table renaming is possible.

Then I stumbled on #435 and more importantly e30cde1

Based on that, it seems

  1. There's no way to rename a struct field X differently than a table name X

  2. And looking at that, I realized struct fields also cannot be renamed differently for two different struct types.

  3. Table names go through the renaming after Singular. That means I need rename: users_widget: blah. That's confusing; the key is neither present in my database nor in the default generated code.

  4. And, where we started from, none of this is documented.

@kyleconroy kyleconroy added the documentation Improvements or additions to documentation label Jul 21, 2020
@kyleconroy kyleconroy added this to the 1.22.0 milestone Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants