I'd like to use SqlSoup with an existing database that contains views. Accessing a table goes swimmingly, but accessing a view results in "PKNotFoundError: table '[viewname]' does not have a primary key defined..."
Do I correctly infer that SqlSoup does not work with database views (by default, at least)? I've been unable to find anything directly relevant on Google, SO, or the SqlAlchemy mailing list. If you were faced with this, how would you proceed if you wanted to access non-updatable views? I'm new to SQLAlchemy and SQLSoup. Here's a specific example: from sqlalchemy.ext.sqlsoup import SqlSoup u = SqlSoup('postgresql+psycopg2://pub...@unison-db.org:5432/unison') seq = u.pseq.filter(u.pseq.pseq_id==76).all() # okay aliases = u.pseqalias.filter(u.pseqalias.pseq_id==76).all() PKNotFoundError: table 'pseqalias' does not have a primary key defined... This is a public database. You can run the equivalent queries using psql: psql -h unison-db.org -U PUBLIC -d unison -c 'select * from pseq where pseq_id=76' psql -h unison-db.org -U PUBLIC -d unison -c 'select * from pseqalias where pseq_id=76' This question is also posted at http://stackoverflow.com/q/6286704/342839 Thanks, Reece -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.