hi -
you're doing a classic mistake-ish thing that will be less possible in 1.4 and the longer term plan is by 2.0 all confusion will be eliminated, which is that you are using the Core select() construct in the way you would use the ORM Query object, when in fact these are two totally different objects that work very differently.
To do a join (and filter) with Core select():
from sqlalchemy import outerjoin, select
j = outerjoin(Task, Round, Task.game_id== Round.game_id)
stmt = select([func.count(..)]).select_from(j).where(...).correlate_except(...)
basically:
1. do not call select.join() or select.outerjoin(). These methods are 100% useless, unfortunately, and are gone in 1.4. use select.select_from(join(A, B, onclause)).
2. select() doesn't have filter(), it has where().
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.