Replies: 1 comment
-
Thank you for your suggestion. I think one enhancement we can make is to inject the original relation's name into |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
sea-orm-cli generate
does not generate named relations. When one entity is related to a second entity by 2 different fields, the generated code calls the relations TargetEntity1 and TargetEntity2, which does not reflect the name of the relation (column).If I manually rename the relation it will be overwritten the next time I run
sea-orm-cli generate
.Steps to Reproduce
1. Create the following tables inside MySQL 8
2. Run sea-orm-cli
Expected Behavior
The relations are named based on the column used for relating them:
Actual Behavior
The relations are named anonymously based on the target entity:
Reproduces How Often
10/10
Workarounds
No workarounds found.
Reproducible Example
Versions
Beta Was this translation helpful? Give feedback.
All reactions