SQLAlchemy 1.4.11 (latest version) throws "could not assemble any primary key columns" error
subhashb opened this issue · 1 comments
subhashb commented
Full error log at: https://github.com/proteanhq/protean/runs/2421579283
Excerpt:
tests/adapters/model/sqlalchemy_model/postgresql/conftest.py:54: in setup_db
domain.get_dao(ArrayUser)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/protean/domain/__init__.py:510: in get_dao
return self.providers.get_dao(aggregate_cls)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/protean/adapters/repository/__init__.py:202: in get_dao
model_cls = self.get_model(aggregate_record.cls)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/protean/adapters/repository/__init__.py:89: in get_model
model_cls = provider.construct_model_class(aggregate_record.cls)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/protean/adapters/repository/sqlalchemy.py:648: in construct_model_class
model_cls = type(entity_cls.__name__ + "Model", (SqlalchemyModel,), attrs)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/protean/adapters/repository/sqlalchemy.py:175: in __init__
super().__init__(classname, bases, dict_)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_api.py:75: in __init__
_as_declarative(reg, cls, dict_)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_base.py:126: in _as_declarative
return _MapperConfig.setup_mapping(registry, cls, dict_, None, {})
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_base.py:177: in setup_mapping
return cfg_cls(registry, cls_, dict_, table, mapper_kw)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_base.py:314: in __init__
self._early_mapping(mapper_kw)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_base.py:200: in _early_mapping
self.map(mapper_kw)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/decl_base.py:979: in map
mapper_cls(self.cls, self.local_table, **self.mapper_args),
<string>:2: in __init__
???
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/util/deprecations.py:298: in warned
return fn(*args, **kwargs)
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/mapper.py:686: in __init__
self._configure_pks()
/opt/hostedtoolcache/Python/3.9.4/x64/lib/python3.9/site-packages/sqlalchemy/orm/mapper.py:1328: in _configure_pks
raise sa_exc.ArgumentError(
E sqlalchemy.exc.ArgumentError: Mapper mapped class ArrayUserModel->array_user could not assemble any primary key columns for mapped table 'array_user'
subhashb commented
Relevant discussion here: sqlalchemy/sqlalchemy#6791