#12885: GenericRelation fails to join the related table from a inherited model
--------------------------------------+------------------------------------
     Reporter:  semenov               |                    Owner:  nobody
         Type:  Bug                   |                   Status:  new
    Component:  contrib.contenttypes  |                  Version:  1.1
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

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>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.b692ae605641490bdffb3d9b9ff0e5c0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to