开发者

SQLAlchemy returns empty, though the generated SQL returns full

I have this code:

db.query(sets, stores).select_from(orm.join(sets, stores,\
sets.store_scheme_id == stores.store_id)).filter(sets.id == id).one()

And I have the SQL debugging level at DEBUG, so it prints out the generated SQL query before it returns. The generated SQL works fine in phpmyadmin. SQLAlchemy, however, DOESN'T work fine and returns to me an empty list (with all() instead of one(), naturally; one() throws an error, as expected when there isn't jus开发者_如何学Got a single row).

Why can't SQLAlchemy hook me up with the data when the generated SQL statement works just fine?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜