[sqlalchemy] Re: Mapping select to Read-only reporting class

2009-10-26 Thread Bryan
To make it work I selected a column for the primary key as you suggested, and that worked thanks. However, my selection of a primary_key column could be arbitrary as there is no real primary key in my SELECT statement. When defining a table, I can define a foreign key column. Then when

[sqlalchemy] Re: Mapping select to Read-only reporting class

2009-09-14 Thread Michael Bayer
Bryan wrote: I want to abstract some ugly reporting SQL strings into a read-only object model. I have created an empty class, and then I map it to a select object that pulls some statistical information from the DB. The mapper is complaining that it can't assemble a primary key. I am only