Michael Bayer wrote:
I added distinct() to selectresults as a method and made the
unit test a little clearer (since i dont like relying on the
selectresults mod)...
q = sess.query(Department)
d = SelectResults(q)
d =
the non-distinct parts of this test fail on postgres, because its
not doing the nesting thing:
sqlalchemy.exceptions.SQLError: (ProgrammingError) column
departments.name must appear in the GROUP BY clause or be used in an
aggregate function
'SELECT count(departments.department_id) \nFROM
I added distinct() to selectresults as a method and made the unit test
a little clearer (since i dont like relying on the selectresults
mod)...
q = sess.query(Department)
d = SelectResults(q)
d =
d.join_to('employees').filter(Employee.c.name.startswith('J'))
d =