I have a view arbeitsmittelhierarchy_arbeitsmittle_view which is defined
as a left join of two tables. Trying to generate a mapper from the autoload view as Table() fails:

File "build/bdist.linux-i686/egg/sqlalchemy/orm/session.py", line 277, in query File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 1838, in class_mapper File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 321, in compile File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 336, in _compile_all File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 363, in _do_compile File "build/bdist.linux-i686/egg/sqlalchemy/orm/mapper.py", line 518, in _compile_tables sqlalchemy.exceptions.ArgumentError: Could not assemble any primary key columns for mapped table 'arbeitsmittelhierarchy_arbeitsmittel_view'

What is the workaround to deal with such views? Creating a PrimaryKeyConstraint for the view?

Andreas

Attachment: pgpjUtzysXxlN.pgp
Description: PGP signature

Reply via email to