You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a field named model that's an enum, sea-orm-cli will generate an enum in sea_orm_active_enums named Model which conflicts with the automatically generated struct Model.
Same issue occurs for a field named relation, active_model, entity, or column.
Steps to Reproduce
Create a table like this:
createtablemodel_example (
id int unsigned primary key,
model enum("A", "B", "C")
)
Run sea-orm-cli to generate the code for this table
Expected Behavior
The CLI wouldn't generate code that fails to compile.
Actual Behavior
Both an enum Model and the struct Model are generated, causing a conflict in that file.
Reproduces How Often
Always reproducible.
Workarounds
You can of course just rename the enum manually.
Reproducible Example
Not sure best way to do this since the issue is with the autogenerated code and database setup, no user code.
Description
If I have a field named
model
that's an enum, sea-orm-cli will generate an enum insea_orm_active_enums
namedModel
which conflicts with the automatically generated structModel
.Same issue occurs for a field named
relation
,active_model
,entity
, orcolumn
.Steps to Reproduce
Expected Behavior
The CLI wouldn't generate code that fails to compile.
Actual Behavior
Both an enum
Model
and the structModel
are generated, causing a conflict in that file.Reproduces How Often
Always reproducible.
Workarounds
You can of course just rename the enum manually.
Reproducible Example
Not sure best way to do this since the issue is with the autogenerated code and database setup, no user code.
Versions
The text was updated successfully, but these errors were encountered: