[sqlalchemy] Executing query results in ProgrammingError: can't adapt type 'InstrumentedAttribute'

2011-08-26 Thread OlduvaiHand
Hi all, I'm having a little bit of trouble with the boundary between the ORM and SQL expression language. Perhaps someone can set me aright. I'm building up a query on a model with a hybrid_property using the ORM. The hybrid_property.expression is a func.case statement. Because 1) I only need

[sqlalchemy] Re: Executing query results in ProgrammingError: can't adapt type 'InstrumentedAttribute'

2011-08-26 Thread OlduvaiHand
Indeed. I did mean to be using the case() function. Thanks, zzzeek. Incidentally, this particular case is supposed to return EnumSymbols of the variety you describe in your EnumRecipe on techspot. Now that the correct case function is being used, I'm still getting a ProgrammingError: can't

[sqlalchemy] Re: Executing query results in ProgrammingError: can't adapt type 'InstrumentedAttribute'

2011-08-26 Thread OlduvaiHand
That makes perfect sense. I really appreciate the help. Everything is working as expected now. On Aug 26, 12:42 pm, Michael Bayer mike...@zzzcomputing.com wrote: On Aug 26, 2011, at 1:34 PM, OlduvaiHand wrote: Indeed.  I did mean to be using the case() function.  Thanks, zzzeek