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
Post a Comment