[sqlalchemy] Problem with .count() on a query that works

2007-08-09 Thread mattrussell
Hi, I have query which works which joins two tables together (Am using elixir and tesla trunks, SA 0.3.10): q = model.Thing.query() q = q.add_entity(model.OtherThing) q = q.filter(my_filter_expr) q.all() This executes fine. but doing: q.count() (Am trying to use webhelpers.paginate) , class

[sqlalchemy] Re: Problem with .count() on a query that works

2007-08-09 Thread mattrussell
() # this doesn't, because the table containing the column 'point' isn't included in the from list. Sorry for the red-herring. Matt On Aug 9, 12:29 pm, mattrussell [EMAIL PROTECTED] wrote: Hi, I have query which works which joins two tables together (Am using elixir and tesla trunks, SA 0.3.10

[sqlalchemy] Question about queries and operators

2007-08-09 Thread mattrussell
Hi, related to my recent post on subclassing Column: The problem I have is that the right tables are not appearing in the FROM list in the query. I have overriden the 'in_' operatror on the column. When calling 'all()' on my query instance, I get the result back as I expected, but when calling

[sqlalchemy] Re: Question about queries and operators

2007-08-09 Thread mattrussell
and geo_location tables together at all. so...you actually just want to multiply geo_route rows times geo_location rows ? anyway, to add a FROM clause explicitly, use query.select_from (geo_location), and the table will be added to the FROM clause. On Aug 9, 2007, at 10:23 AM, mattrussell