Open smndtrl opened 7 months ago
Hey! I'm facing the same issue, have you found a workaround?
I am also unsure where the lowercase is being applied. If anyone have found it, a PR would be appreciated!
Has the same issue in postgres, my enum name is like ModuleType
in pg (I don't use sea-orm for migrations) and enum_name
is set, but orm is lowercasing in on insert and so on to moduletype
I did a workaround and renamed enum in postgres to snake case module_type
and same in rust enum_name
, this solved an issue.
Probably in macros enum_name
is parsed incorrectly or in queries it's lowercased from ModuleType
into moduletype
when it should be ModuleType
.
Description
After running the CLI to generate the types from my existing db, I got
A simple query with it always results in a lowercase
moduletype
not existing - which is correct. The generator correctly extracted the type name with capitals.Steps to Reproduce
enum
with capitals in itsea-orm-cli generate entity
Expected Behavior
inserts work
Actual Behavior
Reproduces How Often
always
Workarounds
Reproducible Example
Versions
sea-orm v0.12.12