Opened 8 years ago

Closed 8 years ago

#4155 closed (duplicate)

[enhancement] Allow Subclassing Models in ORM

Reported by: David Cramer <dcramer@…> Owned by: adrian
Component: Database layer (models, ORM) Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The ORM is following subclassed models to their base classes.

http://dpaste.com/hold/9045/

In theory, this would create the new table (based on all of the old models structure) with syncdb, which it does. You would then be able to access this new model just like the old one, but the data would be in the new table.

However, it is not doing so, it is accessing data from the "Spell" table in this example, when calling any of the ORM functions for TmpSpell

Change History (3)

comment:1 Changed 8 years ago by ubernostrum

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Model subclassing is not currently supported in Django; no guarantees are made that subclassing will or will not work.

comment:2 Changed 8 years ago by David Cramer <dcramer@…>

  • Resolution invalid deleted
  • Status changed from closed to reopened
  • Summary changed from Subclassing Models ORM issues to [enhancement] Allow Subclassing Models in ORM

comment:3 Changed 8 years ago by David Cramer <dcramer@…>

  • Resolution set to duplicate
  • Status changed from reopened to closed

See #1656

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