Opened 3 years ago

Closed 3 years ago

#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


The following example doesn't work:

class Place(models.Model):

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

class Pizzeria(AbstractRestaurant):

class Trattoria(AbstractRestaurant):

Change History (3)

comment:1 Changed 3 years 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 3 years ago by timo

  • Triage Stage changed from Unreviewed to Accepted

comment:3 Changed 3 years 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