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

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -