Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9752 closed (fixed)

select_related on query on model with GeoManager as default manager breaks

Reported by: Sean Legassick Owned by: nobody
Component: GIS Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When running amended gis 'relatedapp' test (amendment in attached patch), the following exception occurs without the patch to GeoQuery also in the attached patch:

Traceback (most recent call last):
  File "/Users/seanl/Code/django/trunk/django/contrib/gis/tests/relatedapp/tests.py", line 98, in test05_select_related_fk_to_subclass
    l = list(DirectoryEntry.objects.all().select_related())
  File "/Users/seanl/Code/django/trunk/django/db/models/query.py", line 162, in __len__
    self._result_cache.extend(list(self._iter))
  File "/Users/seanl/Code/django/trunk/django/db/models/query.py", line 275, in iterator
    for row in self.query.results_iter():
  File "/Users/seanl/Code/django/trunk/django/db/models/sql/query.py", line 206, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/Users/seanl/Code/django/trunk/django/db/models/sql/query.py", line 1734, in execute_sql
    cursor.execute(sql, params)
ProgrammingError: column relatedapp_augmentedlocation.id does not exist
LINE 1: ...ion_ptr_id") INNER JOIN "relatedapp_location" ON ("relatedap...

Attachments (2)

update-get-default-columns-plus-regression-test.patch (2.6 KB ) - added by Sean Legassick 15 years ago.
update-get-default-columns-plus-regression-test-2.patch (2.5 KB ) - added by Sean Legassick 15 years ago.
updated patch removing redundant assignments of quoting method to locals

Download all attachments as: .zip

Change History (5)

by Sean Legassick, 15 years ago

updated patch removing redundant assignments of quoting method to locals

comment:1 by jbronn, 15 years ago

Resolution: fixed
Status: newclosed

Fixed r9572. New I got something mixed up with this ticket number and revision number.

in reply to:  1 comment:2 by jbronn, 15 years ago

Replying to jbronn:

Fixed r9572. New I got something mixed up with this ticket number and revision number.

*sigh*

time to get some sleep.

comment:3 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

Note: See TracTickets for help on using tickets.
Back to Top