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

Add macro to set plural form for table name #86

Open
yanganto opened this issue Jul 7, 2021 · 0 comments
Open

Add macro to set plural form for table name #86

yanganto opened this issue Jul 7, 2021 · 0 comments
Labels
gitcoin RDB RDB feature relating

Comments

@yanganto
Copy link
Member

yanganto commented Jul 7, 2021

Make a macro or derive attribute to use plural form for the table name.
For example, here is using .person because the table relates to the person table.

let owner = post.person()?;

#[belongs_to(Person)]

When the relationship becomes one to many, or the plural wording is not regular,
we need a attribute to specify the plural form.

@yanganto yanganto added the RDB RDB feature relating label Jul 7, 2021
@yanganto yanganto changed the title macro to set plural form for table name Add macro to set plural form for table name Jul 9, 2021
@yanganto yanganto added this to To do in Utilities for RDB feature via automation Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gitcoin RDB RDB feature relating
Development

No branches or pull requests

1 participant