-
-
Notifications
You must be signed in to change notification settings - Fork 521
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
Entity generation for partitioned tables #1582
Comments
Can you create a new folder under |
As a note, other libraries like jooq (java) provide a regex mechanism to exclude unwanted tables like partitions in a schema such as
|
Hey @jared-mackey, thanks for the report! I just drafted a PR to skip parsing partitioned Postgres tables. |
The patch will be released in the coming 0.12.x |
🎉 Released In 0.12.1 🎉Thank you everyone for the contribution! |
Description
Hi,
I'm not certain this is a bug but I don't know if it's correct behavior either. When generating entities for my schema I noticed that the entity generator does a few unexpected things with my partitioned tables:
Steps to Reproduce
table_1
and then each partition will betable_1_p1
throughtable_1_p128
.table_2
.sea-orm-cli generate entity -o entity/src --lib --tables "table_1,table_2" --ignore-tables "table_1_p1,table_1_p2..." --max-connections 25
Expected Behavior
table_1_p1
..table_1_p128
.table_2
would have a single relationship defined -- the one totable_1
.Actual Behavior
✅ I did not get entities created for
table_1_p1
✅ The
table_2
entity correctly had a FK to the main table.❌ The
table_2
entity was filled with relationships totable_1_p1
..table_1_p128
.Example
Reproduces How Often
Every time.
Workarounds
Delete the wrongly generated code.
Versions
0.11.2
The text was updated successfully, but these errors were encountered: