-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Using IntEnum as an argument fails with TypeError #73
Comments
I was using this in the context of FastAPI + SQLModel and solved it by using the SQLAlchemy Column class. Column(Enum(IdentityType)) |
@long2ice Is there anything left for asnycmy from your perspective? Otherwise I would close this |
@long2ice Actually, my workaround does not behave in the way I would like to. The SQLAlchemy Enum column type maps onto the enum column type of MySQL instead of integet. This column type is not supported by all DB technologies and actually I would prefer to map onto integer. So I would say this issue is still valid. |
For anyone else facing this and looking for a solution like I did, please find here a way to inject an IntEnum type in SQLAlchemy yourself: https://stackoverflow.com/questions/33612625/how-to-model-enums-backed-by-integers-with-sqlachemy |
I also look for a solution about this problem. Because my team's project used auto-map data model, it seems not be possible to use the solution which @oktavlachs provided? Could be possible to fix this issue? Very Thanks. |
When using IntEnum values, the following Exception occurs.
I found you fixed this for string Enum already here.
Can you do the same for IntEnum? 🙏
Thanks for your work, I am looking forward to seeing this in production. 👍
The text was updated successfully, but these errors were encountered: