Replies: 1 comment
-
I think you raised a good point. I think in the current state of affairs, well no - for the codegen it's just an ordinary enumeric column. May be we could make the codegen realize it's an ActiveEnum by some convention, e.g. column comments |
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
-
Hey all, in the project I'm working on we are generating entity files with
sea-orm-cli generate entity
. I'm looking at the docs for enums and I'm not sure it's possible to get enums working without using database native enums while still generating the entity files.While using ints for enum value columns the entity will have a type of i32, but I see no way to add in the info that maps this to an enum. When using database native enums the entities are generated in a file
sea_orm_active_enums
which seems correct but native enums won't work across database engines so I'm looking to avoid them.Am I missing something here? Is it possible to use the migration first workflow with generated entities but still store the mapping enum from int to enum value?
Beta Was this translation helpful? Give feedback.
All reactions