Skip to content

table renaming is undocumented and confusing #593

Closed
@tv42

Description

@tv42

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions