python - Problem when querying the database -


when do:

channel = session.query(channel).options(eagerload("items")).filter(channel.title == title) 

i error:

typeerror: 'bool' object not callable 

if rid of options(eagerload("items")), it's working properly.

any idea??

thanks in advance!

sqlalchemy filtering works operator overloading on column objects. are, however, not referencing column object, value property of table. instead of

channel.title == title 

which 'bool' object, need

channel.c.title == title 

which yields slqalchemy specific object.


Comments

Popular posts from this blog

c# - Getting "Internal .Net Framework Data Provider error 30" error when column has NULL value -

SAP Web Service from .NET via WCF -

c++ - How to modify context menu of internet explorer using IDocHostUIHandler::ShowContextMenu? -