On Aug 26, 2011, at 1:09 PM, OlduvaiHand wrote: > 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.
do you mean to be using the case() function , that produces the CASE expression ? It's a standalone function not part of the "func." construct: http://www.sqlalchemy.org/docs/core/expression_api.html?highlight=case#sqlalchemy.sql.expression.case The error you're getting is due to func.case() just being a generic function, the incoming tuple is interpreted as "send straight to the DBAPI" and then it all goes wrong. -- 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.