Chris, On 2/26/07, Chris Brand <[EMAIL PROTECTED]> wrote: > > Having gone on a dot-removal frenzy, I still have this one that fails : > >>> from camps import models > >>> app_list = > models.Application.objects.select_related().order_by('camps_board_time_block > .start_time') > >>> app_list > Traceback (most recent call last): > File "<console>", line 1, in ? > File > "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que > ry.py", line 97, in __repr__ > return repr(self._get_data()) > File > "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que > ry.py", line 430, in _get_data > self._result_cache = list(self.iterator()) > File > "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/que > ry.py", line 172, in iterator > cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + > ",".join(select) + sql, params) > File > "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/backends/u > til.py", line 12, in execute > return self.cursor.execute(sql, params) > File > "/usr/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/backends/m > ysql/base.py", line 35, in execute > return self.cursor.execute(sql, params) > File "/usr/lib/python2.4/site-packages/MySQLdb/cursors.py", line 137, in > execute > self.errorhandler(self, exc, value) > File "/usr/lib/python2.4/site-packages/MySQLdb/connections.py", line 33, > in defaulterrorhandler > raise errorclass, errorvalue > OperationalError: (1054, "Unknown column 'camps_board_time_block.start_time' > in 'order clause'") >
Please apply & test the patch attached to ticket #2076 because I suspect this is the same issue. The select_related() call you are using is a workaround to the real problem as suggested by Malcolm and the patch intends to be a solution to the real problem (note the notation to be used in the order_by call changes, see the documentation). We need the patch tested in as many real world scenarios like yours as we can. Tell us how it did for you. Regards, -- Ramiro Morales --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---