Hollister wrote: >> >> When I run this, I get: >> >> Module sqlalchemy.orm.query:1956 in setup_context >> << context.froms.append(self.selectable) >> if context.order_by is False and self.mapper.order_by: >> context.order_by = self.mapper.order_by>> if >> context.order_by is False and self.mapper.order_by:
I need a full stack trace on this since once from_statement() is called, setup_context() should never be called. >> >> AttributeError: 'QueryContext' object has no attribute 'order_by' >> >> This evidently has nothing to do with the query's order_by clause >> since I get the same error if I remove it. If I execute the query and >> pass the results to paginate: >> >> results = query.all() >> >> c.paginator = paginate.Page( >> results, >> page = int(request.params.get('page', 1)), >> items_per_page = 50, >> ) >> >> I get: >> >> AttributeError: 'Hit' object has no attribute 'count' >> >> Which I guess makes sense, since I don't have that defined in my >> class. >> >> What am I doing wrong? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---