-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
sea-orm-cli generate entity --tables argument doesn't work as described #1243
Comments
It should be able to support multiple tables AFAIK @billy1624 |
Hey @johnbcodes, thanks for the report!! I'm not sure why it was originally be implemented this way. The original approach takes a comma separated table name and then conditionally generate entity of those with table name is a substring of the comma separated input. That means, if you have tables Which isn't what we want! |
I just fix the issue on #1245 |
Thank you @billy1624 @tyt2y3! |
Description
sea-orm-cli generate entity --tables
says that it takes a comma-separated list of tables to generate entities for.However, the Clap definition uses
Option<String>
instead ofVec<String>
. All tables after the first comma are ignored.If the intent is to support multiple tables, the change is small and doesn't harm the single table use case. If the intent is to only generate a single entity, then I think the help should be updated. Either way I'm willing to do the work once I know.
Steps to Reproduce
ledger_entries
andchecks
tablessea-orm-cli generate entity -u <DATABASE_URL> --tables ledger_entries,checks -o src/entities
Expected Behavior
Generates entities for the
ledger_entries
andchecks
tablesActual Behavior
Only generates entity for
ledger_entries
Reproduces How Often
Always
Versions
0.10.3
SQLite
Mac OS 12.6
The text was updated successfully, but these errors were encountered: