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
File "/usr/local/lib/python3.8/dist-packages/sqlmodel/main.py", line 553, in __init__
DeclarativeMeta.__init__(cls, classname, bases, dict_, **kw)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_api.py", line 196, in __init__
_as_declarative(reg, cls, dict_)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_base.py", line 244, in _as_declarative
return _MapperConfig.setup_mapping(registry, cls, dict_, None, {})
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_base.py", line 325, in setup_mapping
return _ClassScanMapperConfig(
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_base.py", line 579, in __init__
self._early_mapping(mapper_kw)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_base.py", line 366, in _early_mapping
self.map(mapper_kw)
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/decl_base.py", line 1954, in map
mapper_cls(self.cls, self.local_table, **self.mapper_args),
File "<string>", line 2, in __init__
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/util/deprecations.py", line 281, in warned
return fn(*args, **kwargs) # type: ignore[no-any-return]
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/mapper.py", line 853, in __init__
self._configure_pks()
File "/usr/local/lib/python3.8/dist-packages/sqlalchemy/orm/mapper.py", line 1639, in _configure_pks
raise sa_exc.ArgumentError(
sqlalchemy.exc.ArgumentError: Mapper Mapper[ContactDetails(contact_details)] could not assemble any primary key columns for mapped table 'contact_details'
I'm using SQLModel v 0.0.19
The text was updated successfully, but these errors were encountered:
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Sqlacodegen version
3.0.0rc5
SQLAlchemy version
2.0.30
RDBMS vendor
MySQL (or compatible)
What happened?
I generated the sqlmodel and got something like this for one table:
But when I try to load this model I get:
I'm using SQLModel v 0.0.19
The text was updated successfully, but these errors were encountered: