Re: [sqlalchemy] mapped selectable forgets its primary key

2012-11-22 Thread Michael Bayer
there's a lot going on here, though an initial idea would be when mapping to a __table__ that is in fact a select(), make that select() in terms of a Table object, not the Inode mapped class. The columns as accessed from the Inode class contain annotations that have special meaning when the ORM

[sqlalchemy] mapped selectable forgets its primary key

2012-11-22 Thread Gabriel
Hello, I have a program that maps a GROUP BY query to orm instances (let's say we have one called comm1). The instances have a relationship attribute: comm1.inodes. Something goes wrong when accessing comm1.inodes. SQLAlchemy generates a query that doesn't have a clause for the instance's primary k