[sqlalchemy] AttributeError: 'MySQLCompiler' object has no attribute 'mapped_table'

2010-02-05 Thread Simone Orsi
Hi all, can anybody explain why this: session.query(Answer).all() - [Answer('...'), ... ] works, but this: session.query(func.sum(Answer.close_answer1)).all() throws the following error? *** AttributeError: 'MySQLCompiler' object has no attribute 'mapped_table' The class 'Answer' is mapped

Re: [sqlalchemy] AttributeError: 'MySQLCompiler' object has no attribute 'mapped_table'

2010-02-05 Thread Michael Bayer
Simone Orsi wrote: Hi all, can anybody explain why this: session.query(Answer).all() - [Answer('...'), ... ] works, but this: session.query(func.sum(Answer.close_answer1)).all() throws the following error? *** AttributeError: 'MySQLCompiler' object has no attribute 'mapped_table'

Re: [sqlalchemy] AttributeError: 'MySQLCompiler' object has no attribute 'mapped_table'

2010-02-05 Thread Simone Orsi
Hi Michael, On 02/05/2010 04:16 PM, Michael Bayer wrote: Simone Orsi wrote: Hi all, can anybody explain why this: session.query(Answer).all() - [Answer('...'), ... ] works, but this: session.query(func.sum(Answer.close_answer1)).all() throws the following error? ***