Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9752 closed (fixed)

select_related on query on model with GeoManager as default manager breaks

Reported by: seanl 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: UI/UX:

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 seanl 7 years ago.
update-get-default-columns-plus-regression-test-2.patch (2.5 KB) - added by seanl 7 years ago.
updated patch removing redundant assignments of quoting method to locals

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by seanl

updated patch removing redundant assignments of quoting method to locals

comment:1 follow-up: Changed 7 years ago by jbronn

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 in reply to: ↑ 1 Changed 7 years ago by jbronn

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 Changed 7 years ago by anonymous

  • milestone post-1.0 deleted

Milestone post-1.0 deleted

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