Comment (by ramiro):
See also #13203.
--
Ticket URL: <https://code.djangoproject.com/ticket/12885#comment:12>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by timgraham):
This remains an issue as of 58c7ff39fb265754fb17ab8d7f8a1401b355777b
(Django 1.10 dev).
Here's the query for the attached failing test:
{{{
SELECT "generic_relations_mineral"."id",
"generic_relations_mineral"."name",
"generic_relations_mineral"."hardness",
"generic_relations_valuablerock"."mineral_ptr_id"
FROM "generic_relations_valuablerock"
INNER JOIN "generic_relations_valuabletaggeditem" ON
("generic_relations_valuablerock"."mineral_ptr_id" =
"generic_relations_valuabletaggeditem"."object_id" AND
("generic_relations_valuabletaggeditem"."content_type_id" = 13))
INNER JOIN "generic_relations_taggeditem" ON
("generic_relations_valuabletaggeditem"."taggeditem_ptr_id" =
"generic_relations_taggeditem"."id")
INNER JOIN "generic_relations_mineral" ON
("generic_relations_valuablerock"."mineral_ptr_id" =
"generic_relations_mineral"."id")
WHERE "generic_relations_taggeditem"."tag" = countertop
}}}
Traceback:
{{{
File "/home/tim/code/django/django/db/backends/sqlite3/base.py", line 323,
in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column:
generic_relations_valuabletaggeditem.object_id
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12885#comment:13>
* Attachment "12885-test.diff" added.
--
Ticket URL: <https://code.djangoproject.com/ticket/12885>
* has_patch: 0 => 1
Comment:
I've created a PR for this (see
https://github.com/django/django/pull/5487). Luckily the changes needed
here were only to contrib.contenttypes. This is always a good sign, we
likely don't have a more fundamental problem. Lets see what CI things of
my PR...
--
Ticket URL: <https://code.djangoproject.com/ticket/12885#comment:14>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/12885#comment:15>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"cd0ba8053dfdc81ade9a656dc8049de600638501" cd0ba805]:
{{{
#!CommitTicketReference repository=""
revision="cd0ba8053dfdc81ade9a656dc8049de600638501"
Fixed #12885 -- Fixed queries with GenericRelations to multi-table
inheritance child models.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/12885#comment:16>