#20883 closed Bug (fixed)

Explicit OneToOneField for multi-table inheritance are not discovered in abstract classes.

Reported by: loic84 Owned by: loic84
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The following example doesn't work:

class Place(models.Model):
	pass

class AbstractRestaurant(models.Model):
	parent = models.OneToOneField(Place, parent_link=True)

class Pizzeria(AbstractRestaurant):
	pass

class Trattoria(AbstractRestaurant):
	pass

Change History (3)

comment:1 Changed 19 months ago by loic84

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to loic84
  • Patch needs improvement unset
  • Status changed from new to assigned

comment:2 Changed 19 months ago by timo

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 19 months ago by Anssi Kääriäinen <akaariai@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 163a34ce4bc1086b346a52c7271f48d2c207f710:

Fixed #20883 -- Made model inheritance find parent links in abstract parents

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