select_related on query on model with GeoManager as default manager breaks
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...
updated patch removing redundant assignments of quoting method to locals