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
There are no similar issues or pull requests for this yet.
Is your feature related to a problem? Please describe.
No response
Describe the solution you would like.
Hello !
First, thanks for this amazing package, this community really needs this.
I tried to use sqladmin with Ormar https://github.com/collerek/ormar/ which is basically another ORM built on top of SQLalchemy. And it seems that sqladmin has troubles with fields, even though under the hood it's SQLachemy, I think you have the same problem while implemtenting SQLModel.
So I figured out maybe if we implement for SQLmodel, we shouldn't be that far from being to implement another ORM.
Traceback (most recent call last):
File "/.cache/pypoetry/virtualenvs/api-5UH-8tMH-py3.10/lib/python3.10/site-packages/sqladmin/models.py", line 57, in __new__
mapper = inspect(model)
File "ache/pypoetry/virtualenvs/-5UH-8tMH-py3.10/lib/python3.10/site-packages/sqlalchemy/inspection.py", line 71, in inspect
raise exc.NoInspectionAvailable(
sqlalchemy.exc.NoInspectionAvailable: No inspection system is available for object of type <class 'ormar.models.metaclass.ModelMetaclass'>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/pegazor_api/__main__.py", line 95, in <module>
class UserAdmin(ModelAdmin, model=User):
File "/pypoetry/virtualenvs/i-5UH-8tMH-py3.10/lib/python3.10/site-packages/sqladmin/models.py", line 59, in __new__
raise InvalidModelError(
sqladmin.exceptions.InvalidModelError: Class User is not a SQLAlchemy model.
Thank you :)
Describe alternatives you considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Well we can consider this in the future.
But the difference between SQLModel and ormar models is that SQLModel will be SQLALchemy models at the same time (at least to my understanding), so we don't have to do much to support them.
But let's keep this open for future references, maybe we could do it in a sane way 👍
Checklist
Is your feature related to a problem? Please describe.
No response
Describe the solution you would like.
Hello !
First, thanks for this amazing package, this community really needs this.
I tried to use
sqladmin
with Ormar https://github.com/collerek/ormar/ which is basically another ORM built on top of SQLalchemy. And it seems thatsqladmin
has troubles with fields, even though under the hood it's SQLachemy, I think you have the same problem while implemtenting SQLModel.So I figured out maybe if we implement for SQLmodel, we shouldn't be that far from being to implement another ORM.
Thank you :)
Describe alternatives you considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: